Template:Navbar/doc: Difference between revisions
Template page
More actions
Undo revision 257379495 by 2607:FB90:5645:29E1:A582:67D3:AAD4:AD78 (talk): Test edit |
use {{TemplateBox}} |
||
| Line 1: | Line 1: | ||
{{ | {{TemplateBox | ||
<!--- | |1 = 1 | ||
|1label = name | |||
|1d-en = Name of the template | |||
|1aliases = <!-- List of aliases, separated by / (a slash) --> | |||
|1type = string/wiki-template-name | |||
|1def = <!-- default value for the parameter --> | |||
|1stat = required | |||
== | |2 = plain | ||
=== | |2label = plain version | ||
|2d-en = Hide the “This box:” text | |||
|2aliases = | |||
|2type = | |||
|2def = | |||
|2stat = optional- | |||
|3 = mini | |||
|3label = short version | |||
|3d-en = Use one-letter links instead of whole words | |||
|3aliases = | |||
|3type = | |||
|3def = | |||
|3stat = optional- | |||
|4 = nodiv | |||
|4label = inline version | |||
|4d-en = Use <bdi> instead of <div> so that the template won’t have its own line in the text | |||
|4aliases = | |||
|4type = | |||
|4def = | |||
|4stat = optional- | |||
|5 = style | |||
|5label = box style | |||
|5d-en = CSS style for the whole box | |||
|5aliases = | |||
|5type = string/line | |||
|5def = | |||
|5stat = optional- | |||
|6 = fontstyle | |||
|6label = font style | |||
|6d-en = CSS style for the text, also applied to the links. Useful for setting font color as that would be overridden by default link color. | |||
|6aliases = | |||
|6type = string/line | |||
|6def = | |||
|6stat = optional- | |||
|7 = brackets | |||
|7label = brackets | |||
|7d-en = Put [brackets] around the links | |||
|7aliases = | |||
|7type = | |||
|7def = | |||
|7stat = optional- | |||
|8 = uselang | |||
|8label = language | |||
|8d-en = Set the template’s language. Not used if the template is transcluded on pages translated with the Translate extension. | |||
|8aliases = | |||
|8type = string/line | |||
|8def = | |||
|8stat = optional- | |||
|9 = miniv | |||
|9label = | |||
|9d-en = | |||
|9d-td = | |||
|9aliases = | |||
|9type = | |||
|9def = | |||
|9stat = deprecated | |||
|10 = viewplain | |||
|10label = | |||
|10d-en = | |||
|10d-td = | |||
|10aliases = | |||
|10type = | |||
|10def = | |||
|10stat = deprecated | |||
|11 = fontcolor | |||
|11label = font color | |||
|11d-en = Set the font color. Deprecated, use <nowiki>|fontstyle = color:<color></nowiki> instead. | |||
|11aliases = | |||
|11type = string/line | |||
|11def = | |||
|11stat = deprecated | |||
|name = navbar | |||
|desc = | |||
|namespace = | |||
|usergroup = | |||
|placement = | |||
|example-value = | |||
|mustbesubst = | |||
|relieson = | |||
|usage-notes = | |||
Copyable examples when inside a given [[Wikipedia:Navigation templates|template]] adds navbar navigational functionality: | Copyable examples when inside a given [[Wikipedia:Navigation templates|template]] adds navbar navigational functionality: | ||
:<tt><nowiki>{{navbar|{{subst:PAGENAME}}|mini=1}}</nowiki></tt> | :<tt><nowiki>{{navbar|{{subst:PAGENAME}}|mini=1}}</nowiki></tt> | ||
| Line 11: | Line 106: | ||
:<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 | :The <code><nowiki>{{subst:PAGENAME}}</nowiki></code> will be substituted with the template’s name when parsed by the servers. | ||
The <tt>miniv=1</tt>, <tt>viewplain=1</tt> and <tt>fontcolor=</tt> parameters have been deprecated. To use the view-only version, use the {{tlx|v}} or {{tlx|view}} templates instead. | The <tt>miniv=1</tt>, <tt>viewplain=1</tt> and <tt>fontcolor=</tt> parameters have been deprecated. To use the view-only version, use the {{tlx|v}} or {{tlx|view}} templates instead. | ||
|shorthand = | |||
|setscats = | |||
|example = navbar/doc | |||
|seealso = | |||
* {{tl|Tnavbar-collapsible}}: For use in conjunction with [[w:Wikipedia:NavFrame#Collapsible tables|Collapsible tables]], floats <small>v • d • e</small> opposite of the [hide]/[show] feature. | |||
<!-- * {{tl|Codifiednavbar}} --> | |||
<!-- * {{tl|Edit templates}} --> | |||
<!-- {{Navigational templates}} --> | |||
|type = | |||
|i18n-method = ext.translate | |||
|print = | |||
}} | |||
== Examples == | == Examples == | ||
{| class="wikitable" | {| class="wikitable" | ||
! Options !! Parameters !! Produces... | ! Options !! Parameters !! Produces... | ||
| Line 39: | Line 140: | ||
| For a color option. || <code><nowiki>{{navbar|Template Name|fontstyle=color:green}}</nowiki></code> || {{navbar|navbar/doc|fontstyle=color:green}} | | For a color option. || <code><nowiki>{{navbar|Template Name|fontstyle=color:green}}</nowiki></code> || {{navbar|navbar/doc|fontstyle=color:green}} | ||
|} | |} | ||
<!--- PLEASE ADD METADATA TO THE <includeonly> SECTION HERE ---> | <!--- PLEASE ADD METADATA TO THE <includeonly> SECTION HERE ---> | ||
<includeonly>{{#if:{{#translation:}}|| | <includeonly>{{#if:{{#translation:}}|| | ||
[[Category:Internal link templates | [[Category:Internal link templates]] | ||
}} | }} | ||
</includeonly> | </includeonly> | ||