Difference between revisions of "Template:Basepage subpage"

From AusMetal Guide
Jump to navigation Jump to search
m (1 revision)
 
en>Godsy
Line 1: Line 1:
{{#switch:
#REDIRECT [[Template:When on basepage]]
  <!--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|}}}
{{Redirect category shell|
| subpage    = {{{2|}}}
{{R from move}}
| subsubpage = {{{3| {{{2|}}} }}}  <!--Respecting empty parameter on purpose-->
{{R from template shortcut}}
}}<!--End switch--><noinclude>
}}
 
{{documentation}}
<!-- Add categories and interwikis to the /doc subpage, not here! -->
</noinclude>

Revision as of 15:26, 12 March 2017