Template:BasePage2 View history

(testing)
No edit summary
 
(7 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{#ifeq: {{#titleparts:{{{1|{{PAGENAME}}}}}|1|1}}| USA<!-- If USA template page -->
{{#ifeq: {{#titleparts:{{{1|{{PAGENAME}}}}}|1}}| Pakistan<!-- If Pakistan template page -->
   | {{#titleparts:{{{1|{{PAGENAME}}}}}|1|2}}<!-- Return "USA/CommonState"-->
   | {{#ifeq: {{#titleparts:{{{1|{{PAGENAME}}}}}|1|2}}| CommonState<!-- If template -->
  | {{#ifeq: {{#titleparts:{{{1|{{PAGENAME}}}}}||-1}}|Main<!-- If ending "Main" -->
      | {{#titleparts:{{{1|{{PAGENAME}}}}}|2}}<!-- Return "Pakistan/CommonState"-->
      | {{#titleparts:{{{1|{{PAGENAME}}}}}|-2}}<!-- Return all but "Main" -->
      | {{#ifeq: {{padright:|4|{{#titleparts:{{{1|{{PAGENAME}}}}}|1|3}}}}|Test<!-- If 2nd level = "Test..." -->
      | {{#ifeq: {{#titleparts:{{{1|{{PAGENAME}}}}}|-1|-2}}|Main<!-- If ending "Main/Preload"-->
          | {{#titleparts:{{{1|{{PAGENAME}}}}}|3}}<!-- Return Pakistan + 2 -->
          | {{#titleparts:{{{1|{{PAGENAME}}}}}|-3}}<!-- Return all but "Main/Preload"-->
          | {{#titleparts:{{{1|{{PAGENAME}}}}}|2}}<!-- Else Pakistan + 1 -->
<!--      | {{#titleparts:{{{1|{{PAGENAME}}}}}|-1}}-->
        }}<!-- End ifeq Test-->
          | {{{1|{{PAGENAME}}}}}<!-- Testing if works normally -->
    }}<!-- End ifeq CommonState-->
        }}
  | {{#ifeq: {{padright:|4|{{#titleparts:{{{1|{{PAGENAME}}}}}|1|2}}}}|Test<!-- If 2nd level = "Test..." -->
     }}
      | {{#titleparts:{{{1|{{PAGENAME}}}}}|2}}<!-- Return first two levels -->
      | {{#titleparts:{{{1|{{PAGENAME}}}}}|1}}<!-- Else return 1st level only -->
     }}<!-- End ifeq non-CommonState pages -->
}}<noinclude>{{documentation|Template:RootPage/doc}}</noinclude>
}}<noinclude>{{documentation|Template:RootPage/doc}}</noinclude>

Latest revision as of 17:38, 14 May 2020

BasePage2

Documentation icon Template documentation[create]
Subpages of this template.