Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:Navbar/doc: Difference between revisions

Template page
Telinchei (talk | contribs)
update documentation of parameter requirements.
Telinchei (talk | contribs)
clarify parameters because I got it wrong last time and broke it
Line 4: Line 4:
== Usage ==
== Usage ==
===General===
===General===
Copy one of the following examples. When it is placed inside a given [[Help:templates|template]], it adds navbar navigational functionality:
Copy one of the following examples. When it is placed inside a given [[Help:templates|template]], and only a template, it adds navbar navigational functionality:
:<tt><nowiki>{{navbar|{{subst:PAGENAME}}|mini=1}}</nowiki></tt>  
:<tt><nowiki>{{navbar|{{subst:PAGENAME}}|mini=1}}</nowiki></tt>  
:<tt><nowiki>{{navbar|{{subst:PAGENAME}}|plain=1}}</nowiki></tt>  
:<tt><nowiki>{{navbar|{{subst:PAGENAME}}|plain=1}}</nowiki></tt>  
:<tt><nowiki>{{navbar|{{subst:PAGENAME}}|fontstyle=color:green}}</nowiki></tt>  
:<tt><nowiki>{{navbar|{{subst:PAGENAME}}|fontstyle=color:green}}</nowiki></tt>  


The <code><nowiki>{{subst:PAGENAME}}</nowiki></code> will be substituted with the template's name when parsed by the servers. For example, <code><nowiki>{{navbar|navbar/doc}}</nowiki></code> gives:<br> {{navbar|navbar/doc}}
The <code><nowiki>{{subst:PAGENAME}}</nowiki></code> will be substituted with the template's name when parsed by the servers. For example, <code><nowiki>{{navbar|{{subst:PAGENAME}}}}</nowiki></code> gives: <code><nowiki>{{navbar|navbar/doc}}</nowiki></code> &ndash; note that the wikispace, while nominally in the URL, is not included in the substituted pagename. And thus, the final output is:{{navbar|navbar/doc}}


===Font-size===
===Font-size===
Line 17: Line 17:
== Examples ==
== Examples ==
===Required parameters===
===Required parameters===
*<code><nowiki>{{navbar|Template Name}}</nowiki></code> – the template name is required and it should include the template-space identifier (or other wikispace as appropriate). It may be automatically filled as in the Usage section for convenience.
*<code><nowiki>{{navbar|Template Name}}</nowiki></code> – the template name is required. ''It must '''not include''' the template-space identifier and it will not work for other wikispaces''. It may be automatically filled as in the Usage section for convenience.


===Optional parameters===
===Optional parameters===