686 bytes added,
21:51, 29 November 2017 m{{#switch:
<!--If no or empty "page" parameter then detect
basepage/subpage/subsubpage-->
{{#if:{{{page|}}}
| {{#if:{{#titleparts:{{{page}}}|0|3}}
| subsubpage <!--Subsubpage or lower-->
| {{#if:{{#titleparts:{{{page}}}|0|2}}
| subpage
| basepage
}}
}}
| {{#if:{{#titleparts:{{FULLPAGENAME}}|0|3}}
| subsubpage <!--Subsubpage or lower-->
| {{#if:{{#titleparts:{{FULLPAGENAME}}|0|2}}
| subpage
| basepage
}}
}}
}}
| basepage = {{{1|}}}
| subpage = {{{2|}}}
| subsubpage = {{{3| {{{2|}}} }}} <!--Respecting empty parameter on purpose-->
}}<!--End switch--><noinclude>
{{Documentation}}
</noinclude>