- Description
- A template that gets the top-level page from text. Useful for making template documentation that can be moved if needed.
- For
Template:Top/doc the magic variable {{PAGENAME}} is Top/doc, and this template would extract Top. The template works on both the documentation page and the page the documentation is included on.
- If no parameter is provided, uses
{{PAGENAME}}.
- Syntax
- {{Top|<parameter1>}}
- Sample
{{Top}} or {{Top|{{PAGENAME}}}}
- Gives:
Top
- Usage with
Template:T
{{T|{{Top}}|parameter1}}
- Gives:
- {{Top|<parameter1>}}
- Template for templates
;Description
: This template is used to <do something>.
;Syntax
: {{T|{{Top}}|parameter1}}
;Sample
: <code><nowiki>{{</nowiki>{{Top}}<nowiki>|First/Parameter}}</nowiki></code>
: Gives:
:: {{{{Top}}|First/Parameter}}