Template:Transclude/doc: Difference between revisions

From wiki.jriver.com
Jump to navigation Jump to search
(Created page with "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 templat...")
 
No edit summary
 
Line 10: Line 10:
*<code><nowiki>{{transclude| :Foo }}</nowiki></code> → '''{{transclude|:Foo}}'''
*<code><nowiki>{{transclude| :Foo }}</nowiki></code> → '''{{transclude|:Foo}}'''
*<code><nowiki>{{transclude| :File:Foo }}</nowiki></code> → '''{{transclude|:File:Foo}}'''
*<code><nowiki>{{transclude| :File:Foo }}</nowiki></code> → '''{{transclude|:File:Foo}}'''

== See also ==

<includeonly>
<!-- CATEGORIES AND INTERWIKIS HERE, THANKS -->
[[Category:Wikipedia formatting and function templates|Transclude]]

</includeonly>

<templatedata>
{
"description": "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.",
"params": {
"1": {
"label": "Page name",
"description": "The name of the page you are trying to link to",
"type": "string",
"required": true
}
}
}
</templatedata>



<includeonly>[[Category:Templates|{{PAGENAME}}]]<!-- Any categories for the template itself --></includeonly>
<includeonly>[[Category:Templates|{{PAGENAME}}]]<!-- Any categories for the template itself --></includeonly>

Latest revision as of 03:37, 15 April 2014

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.

The most prominent use of this template is in the Template:Navbar menu used at the top of each {{navbox}}, though it is used in other templates as well, such as {{usbk}}.

Usage

  • {{transclude| Template:Foo }}Template:Foo
  • {{transclude| Category:Foo }}Category:Foo
  • {{transclude| Foo }}Template:Foo
  • {{transclude| :Foo }}Foo
  • {{transclude| :File:Foo }}File:Foo