Template:RootPage/doc View history

(Created initial doc)
 
(Created initial doc)
Line 17: Line 17:
|}
|}


== Special version ==
A special version of this template is {{tl|RootPage2}} where it operates the same and {{tlc|RootPage}} except if the root page is '''USA''' it uses the second subpage. This enables the automation of [[USA/CommonState]] to display normally if it is the sample template or deployed on an actual state page without further modifications.
{| class= "wikitable"
! Pagename
! <nowiki>{{RootPage2}}</nowiki>
|-
| USA/CommonState/Test
| {{RootPage2|USA/CommonState/Test}}
|-
| USA/CommonState
| {{RootPage2|USA/CommonState}}
|-
| Arizona/To do
| {{RootPage2|Arizona/To do}}
|}





Revision as of 01:09, 10 July 2014

This is a documentation subpage for Template:RootPage.
It contains usage information, categories and other content that is not part of the original template page.

This template uses the #titleparts parser function extension to extract only the root of the page name.

Usage

Place {{RootPage}} where the root of the current page name is desired. An optional parameter is a pagename other than the current pagename.

Pagename {{RootPage}}
USA/CommonState/Test USA
USA USA

Special version

A special version of this template is {{RootPage2}} where it operates the same and {{RootPage}} except if the root page is USA it uses the second subpage. This enables the automation of USA/CommonState to display normally if it is the sample template or deployed on an actual state page without further modifications.

Pagename {{RootPage2}}
USA/CommonState/Test CommonState
USA/CommonState CommonState
Arizona/To do Arizona