Dominion Atlantic Railway Digital Preservation Initiative - Wiki
Use of this site is subject to our Terms & Conditions.
Difference between revisions of "Template:Transclude/doc"
(Created page with "{{Documentation subpage}} {{high-risk|6,900,000+}} <!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE --> This template resolves page names as they would be ha...") |
|||
Line 24: | Line 24: | ||
[[Category:Wikipedia formatting and function templates|Transclude]] | [[Category:Wikipedia formatting and function templates|Transclude]] | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
</includeonly> | </includeonly> |
Latest revision as of 03:44, 9 February 2012
{{#if: |
{{#if:x||
}} |{{#ifeq: doc | doc
|
{{
#ifeq: show | show | {{ {{#switch: {{#if: | | {{#if: | {{#ifeq:| | talk | }} | {{#ifeq:template|template talk | talk | template }} }} }}
| main | = ambox | talk = tmbox | user = ombox | wikipedia = ombox | file | image = imbox | mediawiki = ombox | template = ombox | help = ombox | category = cmbox | portal = ombox | book = ombox | other | #default = ombox
}}
| type = notice
| image = none
| imageright =
| class =
| style =
| textstyle =
| text = This is a documentation subpage for Template:Transclude (see that page for the {{ #if: Template | template | article }} itself).
It contains usage information, categories and other content that is not part of the original {{ #if: Template |template page|article}}.
| small =
| smallimage =
| smallimageright =
| smalltext =
| subst =
| date =
}}
}}{{ #if: | | [[Category:{{ #if: Template | Template | Article }} documentation]] }}
| }} }} Template:High-risk
This template resolves page names as they would be handled by MediaWiki's template-transclusion process. It thereby removes ambiguity when doing other things with template pagenames, e.g. linking.
Key usage is in navboxes' view, discuss, edit (v,d,e) menu.
Usage
{{transclude| Template:Foo }}
→ {{#switch: Template
|#default = Template:Foo | = {{#ifeq: Template | | Template:Template:Foo | Foo }}
}}
{{transclude| Category:Foo }}
→ {{#switch: Category
|#default = Category:Foo | = {{#ifeq: Category | | Template:Category:Foo | Foo }}
}}
{{transclude| Foo }}
→ {{#switch:
|#default = Foo | = {{#ifeq: | | Template:Foo | Foo }}
}}
{{transclude| :Foo }}
→ {{#switch:
|#default = Foo | = {{#ifeq: | Template | Template::Foo | Foo }}
}}
{{transclude| :File:Foo }}
→ {{#switch: File
|#default = File:Foo | = {{#ifeq: File | Template | Template::File:Foo | Foo }}
}}
See also
- {{Linked}}
- {{Category title}}
- {{File title}}