Difference between revisions of "Template:Navbar"

From EVE University Wiki
Jump to: navigation, search
(Attempting to fix. Only 10 pages use this template so publishing as I go.)
(Fixed linkage to link to the actual template rather than an article name without Template:.)
(11 intermediate revisions by one other user not shown)
Line 4: Line 4:
  
 
-->{{#if:{{{mini|}}}{{{plain|}}}|<!--nothing-->|<!--else:
 
-->{{#if:{{{mini|}}}{{{plain|}}}|<!--nothing-->|<!--else:
--><span style="word-spacing:0;{{{fontstyle|}}}">{{{text|This box:}}} </span>}}<!--
+
--><span style="word-spacing:0;{{{fontstyle|}}}">{{{text|This box: }}} </span>}}<!--
  
 
-->{{#if:{{{brackets|}}}|<span style="margin-right:-0.125em;{{{fontstyle|}}}">&#91;</span>}}<!--
 
-->{{#if:{{{brackets|}}}|<span style="margin-right:-0.125em;{{{fontstyle|}}}">&#91;</span>}}<!--
  
--><ul><!--
+
--><!--
--><li class="nv-view">[[{{{{1}}}|<span title="View this template" <!--
+
-->[[Template:{{{1}}}|<span title="View this template" <!--
-->style="{{{fontstyle|}}}">{{#if:{{{mini|}}}|v|view}}</span>]]</li><!--
+
-->style="{{{fontstyle|}}}">{{#if:{{{mini|}}}|v|view}}</span>]] &middot; <!--
  
--><li class="nv-talk">[[{{TALKPAGENAME:{{{1}}}}}|<span title="Discuss this template" <!--
+
-->[[Template_{{TALKPAGENAME:{{{1}}}}}|<span title="Discuss this template" <!--
-->style="{{{fontstyle|}}}">{{#if:{{{mini|}}}|t|talk}}</span>]]</li><!--
+
-->style="{{{fontstyle|}}}">{{#if:{{{mini|}}}|t|talk}}</span>]] &middot; <!--
  
 
-->{{#if:{{{noedit|}}}|<!--nothing-->|<!--else:
 
-->{{#if:{{{noedit|}}}|<!--nothing-->|<!--else:
--><li class="nv-edit">[{{fullurl:{{{1}}}|action=edit}} <span title="Edit this template" <!--
+
-->[{{fullurl:Template:{{{1}}}|action=edit}} <span title="Edit this template" <!--
-->style="{{{fontstyle|}}}">{{#if:{{{mini|}}}|e|edit}}</span>]</li>}}<!--
+
-->style="{{{fontstyle|}}}">{{#if:{{{mini|}}}|e|edit}}</span>]}}<!--
--></ul><!--
+
--><!--
  
 
-->{{#if:{{{brackets|}}}|<span style="margin-left:-0.125em;{{{fontstyle|}}}">&#93;</span>}}<!--
 
-->{{#if:{{{brackets|}}}|<span style="margin-left:-0.125em;{{{fontstyle|}}}">&#93;</span>}}<!--
Line 24: Line 24:
 
--></div></includeonly>
 
--></div></includeonly>
 
<noinclude>
 
<noinclude>
{{Navbar|1=Navbar}}
 
 
{{documentation}}
 
{{documentation}}
 
</noinclude>
 
</noinclude>

Revision as of 03:51, 9 January 2020



Template documentation (for the above template, sometimes hidden or invisible)

Usage

General

Copy one of the following examples. When it is placed inside a given 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:

{{navbar|{{subst:FULLPAGENAME}}|mini=1}} (v/t/e only, most used)
{{navbar|{{subst:FULLPAGENAME}}|plain=1}} (no "this box" comment)
{{navbar|{{subst:FULLPAGENAME}}|fontstyle=color:green}} (may fit better in some navboxes)

The {{subst:FULLPAGENAME}} will be substituted with the template's namespace and pagename, when parsed by the servers. For example, {{navbar|{{subst:FULLPAGENAME}}}} on this template page gives: {{navbar|navbar}}. 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:

Font-size

Font-size is 88% when used in a navbar, and 100% when nested in a navbox. In the navbar, the weight is "normal"; when nested in navbox, it takes on the outer setting. The middot is bold.

Examples

Required parameters

  • {{navbar|Template Name}} – 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

Options Parameters Produces... (this page)
Basic {{navbar|Template: Name}}
Different text {{navbar|Template: Name|text=This template:}}
Without "This box:" text {{navbar|Template: Name|plain=1}}
Short version {{navbar|Template: Name|mini=1}}
With a color option {{navbar|Template: Name|fontstyle=color:green}}
With brackets {{navbar|Template: Name|brackets=1}}

Deprecated parameters

The miniv=1, viewplain=1, nodiv=1 and fontcolor= parameters have been deprecated. To implement the view-only version, use the {{v}} or {{view}} templates instead.

Notes

Navbar is contained within a <div>...</div> in order to accomodate a horizontal unnumbered list. This means it cannot be placed inside a <span>...</span> or other inline element, because Tidy will 'fix' situations where it finds block elements inside inline elements.

Prepackaged

{{Tnavbar-header}}
Positions ·· e on the right edge of the line, often used in non-collapsible navbox heading.
{{Tnavbar-navframe}}
For use in conjunction with Navframe divs, positions ·· e opposite of the [hide]/[show] feature.
{{Tnavbar-collapsible}}
For use in conjunction with Collapsible tables, floats ·· e opposite of the [hide]/[show] feature.
Visit Template:Navbar/doc to edit this text! (How does this work?) (Refresh this text - why?)