Template:Navbar/doc: Difference between revisions

added doc about shortcuts
(simplified version from wikipedia; omitting "move" option because it's buggy.)
(added doc about shortcuts)
 
Line 48: Line 48:
|}
|}
Note that to show the history, and watchlist links, {{para|template}} needs to be set to the template value specifically. Individual values can be left out of this list, e.g. <code><nowiki>{{navbar|template=Template Name|h|w}}</nowiki></code> will only show the view, history, and watchlist links.
Note that to show the history, and watchlist links, {{para|template}} needs to be set to the template value specifically. Individual values can be left out of this list, e.g. <code><nowiki>{{navbar|template=Template Name|h|w}}</nowiki></code> will only show the view, history, and watchlist links.
===Shortcut templates ===
The <code>mini=y</code> and <code>plain=y</code> parameters can be avoided by using the {{tlx|v}} or {{tlx|view}} templates, respectively, instead.
{{tl|view}} and {{tl|v}} also support changing the shown links, for example only view and edit, or only view and talk:
{| class="wikitable"
|-
! Code
! Result
|-
|<code><nowiki>{{view|template=view/doc}}</nowiki></code>
|{{view|template=view/doc}}
|-
|<code><nowiki>{{view|template=view/doc|talk}}</nowiki></code>
|{{view|template=view/doc|talk}}
|-
|<code><nowiki>{{view|template=view/doc|talk|edit}}</nowiki></code>
|{{view|template=view/doc|talk|edit}}
|-
|<code><nowiki>{{v|template=v/doc}}</nowiki></code>
|{{v|template=v/doc}}
|-
|<code><nowiki>{{v|template=v/doc|t}}</nowiki></code>
|{{v|template=v/doc|t}}
|-
|<code><nowiki>{{v|template=v/doc|t|e}}</nowiki></code>
|{{v|template=v/doc|t|e}}
|}
==Notes==
Navbar is contained within a <code><nowiki><div>...</div></nowiki></code> in order to accommodate a horizontal unnumbered list. This means it cannot be placed inside a <code><nowiki><span>...</span></nowiki></code> or other inline element.