More actions
m →General: code appears on the background of template:documentation so I might as well put it in. |
mNo edit summary |
||
| (7 intermediate revisions by 5 users not shown) | |||
| Line 1: | Line 1: | ||
<!---PLEASE ADD METADATA TO THE <includeonly> SECTION AT THE BOTTOM OF THIS PAGE---> | <!---PLEASE ADD METADATA TO THE <includeonly> SECTION AT THE BOTTOM OF THIS PAGE---> | ||
<noinclude>{{main|Template:Navbar}}</noinclude> | |||
== Usage == | == Usage == | ||
===General=== | ===General=== | ||
Copy one of the following examples. When it is placed inside a given [[Help:templates|template]] | Copy one of the following examples. When it is placed inside a given [[wikipedia:Help:templates|template]] or other page it adds navbar navigational functionality to the following; the pagename, its doc subpage, and an editing link to the page, as follows: | ||
:<tt><nowiki>{{navbar|{{subst: | :<tt><nowiki>{{navbar|{{subst:FULLPAGENAME}}|mini=1}}</nowiki></tt> (v/t/e only, most used) | ||
:<tt><nowiki>{{navbar|{{subst: | :<tt><nowiki>{{navbar|{{subst:FULLPAGENAME}}|plain=1}}</nowiki></tt> (no "this box" comment) | ||
:<tt><nowiki>{{navbar|{{subst: | :<tt><nowiki>{{navbar|{{subst:FULLPAGENAME}}|fontstyle=color:green}}</nowiki></tt> (may fit better in some navboxes) | ||
The <code><nowiki>{{subst: | The <code><nowiki>{{subst:FULLPAGENAME}}</nowiki></code> will be substituted with the template's namespace and pagename, when parsed by the servers. For example, <code><nowiki>{{navbar|{{subst:FULLPAGENAME}}}}</nowiki></code> on this template page gives: <code><nowiki>{{navbar|navbar}}</nowiki></code>. Note that the wikispace, is nominally in the link or URL (eg [[:Template:Navbox]] and is included in the parameter specified. And thus, the final output of this test example is inside the following: | ||
{|style="background:#000000" | |||
|{{navbar|navbar}} | |||
|} | |||
===Font-size=== | ===Font-size=== | ||
| Line 17: | Line 19: | ||
== Examples == | == Examples == | ||
===Required parameters=== | ===Required parameters=== | ||
*<code><nowiki>{{navbar|Template Name}}</nowiki></code> – the template name is required. | *<code><nowiki>{{navbar|Template Name}}</nowiki></code> – the template name is required. It should the template-space identifier, as per FULLPAGENAME magic word formatting. It may be automatically filled as in the Usage section, again with the magic word code, for convenience. | ||
===Optional parameters=== | ===Optional parameters=== | ||
| Line 50: | Line 52: | ||
<!--- PLEASE ADD METADATA TO THE <includeonly> SECTION HERE ---> | <!--- PLEASE ADD METADATA TO THE <includeonly> SECTION HERE ---> | ||
<includeonly> | <includeonly>[[Category:Navbox templates]]</includeonly> | ||
[[Category: | <noinclude>[[Category:Template documentation]]</noinclude> | ||
</ | |||