Template:Transclude: Difference between revisions
Jump to navigation
Jump to search
(Created page with "Template:Transclude") |
m (1 revision) |
||
(3 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
Template:Transclude | <includeonly>{{#switch: {{NAMESPACE: {{{1}}} }} | ||
|#default = {{FULLPAGENAME: {{{1}}} }} <!-- eg "User:Foo" --> | |||
|{{ns:0}} = | |||
{{#ifeq: {{NAMESPACE: {{{1}}} }} | {{NAMESPACE: Template{{{1}}} }} | |||
| Template:{{{1}}} <!-- no leading colon, eg "Foo" --> | |||
| {{PAGENAME: {{{1}}} }} <!-- leading colon, eg ":Foo", so we want the article --> | |||
}} | |||
}}</includeonly><noinclude> | |||
{{/doc}} | |||
[[Category:Templates]][[fr:Modèle:Transclude]] | |||
</noinclude> |
Latest revision as of 16:51, 14 October 2011
This template is used on 6,600,000+ pages. To avoid large-scale disruption and unnecessary server load, any changes should first be tested in this template's /sandbox or /testcases subpage, or in your own user space. The tested changes can then be added in one single edit to this template. Please consider discussing any changes on the talk page before implementing them. |
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 }}
→ Template:Foo{{transclude| Category:Foo }}
→ Category:Foo{{transclude| Foo }}
→ Template:Foo{{transclude| :Foo }}
→ Foo{{transclude| :File:Foo }}
→ File:Foo
See also
- {{Linked}}
- {{Category title}}
- {{File title}}
ar:قالب:Transclude et:Mall:Transclude fa:الگو:Transclude gu:ઢાંચો:Transclude id:Templat:Transclude ja:Template:Transclude pt:Predefinição:Transcludefr:Modèle:Transclude