Template:Template doc

From PCSAR

(Difference between revisions)
Jump to: navigation, search
Current revision (19:49, 3 March 2013) (edit) (undo)
 
(3 intermediate revisions not shown.)
Line 18: Line 18:
;;; if this is in any namespace but the normal Template:, include the namespace in the templatename
;;; if this is in any namespace but the normal Template:, include the namespace in the templatename
-
-->{{#ifeq: Template | {{NAMESPACE}}
+
-->{{#ifeq: Template | {{NAMESPACE}}<!--
-
|
+
 
-
| {{NAMESPACE}}: }}<!--
+
-->|<!--
 +
 
 +
;;; use {{;}} for colon in case NAMESPACE is blank
 +
 
 +
-->|{{NAMESPACE}}{{;}}<!--
 +
 
 +
-->}}<!--
;;; Give the template name. If this is a Doc subpage, give the name of the parent page (the template itself).
;;; Give the template name. If this is a Doc subpage, give the name of the parent page (the template itself).

Current revision

This is the documentation for the template Template:Template doc

Template:Template doc/Doc:

The template {{Template doc|argumentlist|template description}} creates the first line of template documentation. It's intended to be used on /Doc subpages as set up by the Template:Documentation.

The text displayed is:

The template {{templatename|<argumentlist>}} <template description>

When displayed on /Doc subpages, the word "template" links back to the template itself.


argumentlist and template description are both optional.


If you use the following examples on your own page, instead of {{Doc... you will get the name of your template.

You type... You get...
{{Template Doc||does nothing interesting}} 
The template {{Template doc}} does nothing interesting
{{Template Doc|pagename|does nothing interesting}} 
The template {{Template doc|pagename}} does nothing interesting
{{Template Doc|<nowiki>pagename1|pagename2</nowiki>|does nothing interesting}} 
The template {{Template doc|pagename1|pagename2}} does nothing interesting
{{Template Doc| <nowiki>pagename1|pagename2</nowiki> |can have leading/trailing spaces}} 
The template {{Template doc|pagename1|pagename2}} can have leading/trailing spaces
{{Template Doc|<nowiki>arg=value</nowiki>|does nothing interesting}} 
The template {{Template doc|arg=value}} does nothing interesting
{{Template Doc|pagename}} some more text 
The template {{Template doc|pagename}} some more text
{{Template Doc}} some more text 
The template {{Template doc}} some more text


To see how this template is implemented, edit this page and examine the portion between <includeonly> and </includeonly>.

Personal tools