Difference between revisions of "Template:Basepage subpage"
From Self-sufficiency
m (Protected Template:Basepage subpage: This is a meta-template, when it is used it will become high-risk. ([edit=sysop] (indefinite) [move=sysop] (indefinite))) |
m (1 revision) |
||
(8 intermediate revisions by 5 users not shown) | |||
Line 1: | Line 1: | ||
{{#switch: | {{#switch: | ||
− | <!--If no or empty " | + | <!--If no or empty "page" parameter then detect |
basepage/subpage/subsubpage--> | basepage/subpage/subsubpage--> | ||
− | {{#if:{{{ | + | {{#if:{{{page|}}} |
− | | {{ | + | | {{#if:{{#titleparts:{{{page}}}|0|3}} |
+ | | subsubpage <!--Subsubpage or lower--> | ||
+ | | {{#if:{{#titleparts:{{{page}}}|0|2}} | ||
+ | | subpage | ||
+ | | basepage | ||
+ | }} | ||
+ | }} | ||
| {{#if:{{#titleparts:{{FULLPAGENAME}}|0|3}} | | {{#if:{{#titleparts:{{FULLPAGENAME}}|0|3}} | ||
− | | subsubpage <!-- Subsubpage or lower | + | | subsubpage <!--Subsubpage or lower--> |
| {{#if:{{#titleparts:{{FULLPAGENAME}}|0|2}} | | {{#if:{{#titleparts:{{FULLPAGENAME}}|0|2}} | ||
| subpage | | subpage | ||
Line 12: | Line 18: | ||
}} | }} | ||
}} | }} | ||
− | | basepage = {{{1|}}} | + | |
− | | subpage | + | | basepage = {{{1|}}} |
− | | subsubpage = {{{3| {{{2|}}} }}} | + | | subpage = {{{2|}}} |
− | + | | subsubpage = {{{3| {{{2|}}} }}} <!--Respecting empty parameter on purpose--> | |
}}<!--End switch--><noinclude> | }}<!--End switch--><noinclude> | ||
− | |||
{{documentation}} | {{documentation}} | ||
<!-- Add categories and interwikis to the /doc subpage, not here! --> | <!-- Add categories and interwikis to the /doc subpage, not here! --> | ||
</noinclude> | </noinclude> |
Latest revision as of 18:39, 13 October 2010
[edit]
Documentation