(improved and simplified) |
(isolating regions) |
||
Line 1: | Line 1: | ||
{{#ifeq: {{#titleparts:{{{1|{{PAGENAME}}}}}| | {{#ifeq: {{#titleparts:{{{1|{{PAGENAME}}}}}|2}}| USA/CommonState<!-- If USA template page --> | ||
| {{#titleparts:{{{1|{{PAGENAME}}}}}|2}}<!-- Return "USA/ | | {{#titleparts:{{{1|{{PAGENAME}}}}}|2}}<!-- Return "USA/CommonState"--> | ||
| {{#ifeq: {{padright:|4|{{#titleparts:{{{1|{{PAGENAME}}}}}|1|2}}}}|Test<!-- If 2nd level = "Test..." --> | | {{#ifeq: {{padright:|4|{{#titleparts:{{{1|{{PAGENAME}}}}}|1|2}}}}|Test<!-- If 2nd level = "Test..." --> | ||
| {{#titleparts:{{{1|{{PAGENAME}}}}}|2}}<!-- Return first two levels --> | | {{#titleparts:{{{1|{{PAGENAME}}}}}|2}}<!-- Return first two levels --> |