Help:Templates: Difference between revisions

more
No edit summary
(more)
Line 5: Line 5:
{{example}}
{{example}}


Sometimes, you may want to write about the template on its page (often to explain how and when to use it), but you don't want this text to appear on the template itself.  To do this, you should enclose such text with <nowiki><noinclude> and </noinclude></nowiki> so that it does not appear on every page you use the template on.  An example can be found in the {{tl|policy}} template.  Below the box is a line of text that does not appear on policy pages.
Sometimes, you may want to write about the template on its page (often to explain how and when to use it), but you don't want this text to appear on the template itself.  To do this, you should enclose such text with <nowiki><noinclude> and </noinclude></nowiki> so that it does not appear on every page you use the template on.  An example can be found in the {{tl|policy}} template.  Below the box is a line of text that does not appear on policy pages. The opposite can also be made, by writing <nowiki><noinclude> and </noinclude></nowiki> tags around to only make text appear when included. This is very useful for categories.
 
== Modifyers ==
=== Non-template namespace ===
By writing <nowiki>{{Namespace:Page name}}</nowiki>, pages from various namespaces can be included. To include namespaceless pages, <nowiki>{{:Page name}}</nowiki> should be written.
=== Substitution ===
Templates can be substituted by writing <nowiki>{{SUBST:Template name}}, {{SUBST:Namespace:Page name}} or {{SUBST::Page name}}. By writing {{SUBST:Example}}</nowiki>, the content on {{tl|Example}} is placed on the page instead of just <nowiki>{{Example}}</nowiki> when someone edits.


{{stub}}
{{stub}}
[[category:help|Templates]]
[[category:help|Templates]]
[[category:Templates| ]]
1

edit