Template:Transclude: Difference between revisions

From MC Public Wiki
Jump to navigation Jump to search
No edit summary
m (1 revision)
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{#switch: {{NAMESPACE: {{{1}}} }}
<includeonly>{{#switch: {{NAMESPACE: {{{1}}} }}
  |#default = {{FULLPAGENAME: {{{1}}} }} <!-- eg "User:Foo" -->
  |#default = {{FULLPAGENAME: {{{1}}} }} <!-- eg "User:Foo" -->
  |{{ns:0}} =  
  |{{ns:0}} =  
Line 6: Line 6:
       | {{PAGENAME: {{{1}}} }}      <!-- leading colon, eg ":Foo", so we want the article -->
       | {{PAGENAME: {{{1}}} }}      <!-- leading colon, eg ":Foo", so we want the article -->
     }}
     }}
}}<noinclude>
}}</includeonly><noinclude>
{{documentation}}
{{/doc}}
 
[[Category:Templates]][[fr:Modèle:Transclude]]
</noinclude>
</noinclude>

Latest revision as of 16:51, 14 October 2011


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

ar:قالب:Transclude et:Mall:Transclude fa:الگو:Transclude gu:ઢાંચો:Transclude id:Templat:Transclude ja:Template:Transclude pt:Predefinição:Transcludefr:Modèle:Transclude