Template:Navbar/doc: Difference between revisions
More actions
Use {{^(}} and {{)^}} to escape TemplateData descriptions and add comments explaining why |
m Fix Linter errors. |
||
| (3 intermediate revisions by 2 users not shown) | |||
| Line 87: | Line 87: | ||
|11 = fontcolor | |11 = fontcolor | ||
|11label = font color | |11label = font color | ||
|11d-en = Set the font color. Deprecated, use <nowiki>|fontstyle = color: | |11d-en = Set the font color. Deprecated, use <nowiki>|fontstyle = color:⧼color⧽</nowiki> instead. | ||
|11aliases = | |11aliases = | ||
|11type = string/line | |11type = string/line | ||
|11def = | |11def = | ||
|11stat = deprecated | |11stat = deprecated | ||
| 12 = thisbox | |||
| 12label = Text | |||
| 12d = Custom leading text | |||
| 12def = This box | |||
| 12type = string/line | |||
| 12stat = optional | |||
|name = navbar | |name = navbar | ||
| Line 106: | Line 110: | ||
|usage-notes = | |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: | ||
:< | :<code><nowiki>{{navbar|{{subst:PAGENAME}}|mini=1}}</nowiki></code> | ||
:< | :<code><nowiki>{{navbar|{{subst:PAGENAME}}|plain=1}}</nowiki></code> | ||
:< | :<code><nowiki>{{navbar|{{subst:PAGENAME}}|mini=1|nodiv=1}}</nowiki></code> | ||
:< | :<code><nowiki>{{navbar|{{subst:PAGENAME}}|plain=1|nodiv=1}}</nowiki></code> | ||
:< | :<code><nowiki>{{navbar|{{subst:PAGENAME}}|fontstyle=color:green}}</nowiki></code> | ||
:The <code><nowiki>{{subst:PAGENAME}}</nowiki></code> will be substituted with the template’s name when parsed by the servers. | :The <code><nowiki>{{subst:PAGENAME}}</nowiki></code> will be substituted with the template’s name when parsed by the servers. | ||
The < | The <code>miniv=1</code>, <code>viewplain=1</code> and <code>fontcolor=</code> parameters have been deprecated. To use the view-only version, use the {{tlx|v}} or {{tlx|view}} templates instead. | ||
|shorthand = | |shorthand = | ||
|setscats = | |setscats = | ||
| Line 134: | Line 138: | ||
|- | |- | ||
| Normal || <code><nowiki>{{navbar|Template Name}}</nowiki></code> || {{navbar|navbar/doc}} | | Normal || <code><nowiki>{{navbar|Template Name}}</nowiki></code> || {{navbar|navbar/doc}} | ||
|- | |||
| Different text | |||
| <code>{{tlx|Navbar|''Template Name''|3=thisbox{{=}}This template}}</code> | |||
| {{Navbar/i18n/en|navbar/doc|thisbox=This template}} | |||
|- | |- | ||
| No "This box:" text. || <code><nowiki>{{navbar|Template Name|plain=1}}</nowiki></code> || {{navbar|navbar/doc|plain=1}} | | No "This box:" text. || <code><nowiki>{{navbar|Template Name|plain=1}}</nowiki></code> || {{navbar|navbar/doc|plain=1}} | ||
Latest revision as of 17:35, 11 November 2022
No description yet available.
Usage
{{navbar |1= |thisbox= }}
Copyable examples when inside a given template adds navbar navigational functionality:
{{navbar|{{subst:PAGENAME}}|mini=1}}{{navbar|{{subst:PAGENAME}}|plain=1}}{{navbar|{{subst:PAGENAME}}|mini=1|nodiv=1}}{{navbar|{{subst:PAGENAME}}|plain=1|nodiv=1}}{{navbar|{{subst:PAGENAME}}|fontstyle=color:green}}
- The
{{subst:PAGENAME}}will be substituted with the template’s name when parsed by the servers.
The miniv=1, viewplain=1 and fontcolor= parameters have been deprecated. To use the view-only version, use the {{v}} or {{view}} templates instead.
Template parameters
| Parameter | Description | Default | Status | |
|---|---|---|---|---|
1 | name | Name of the template | empty | required |
plain | plain version | Hide the “This box:” text | empty | optional |
mini | short version | Use one-letter links instead of whole words | empty | optional |
nodiv | inline version | Use <bdi> instead of <div> so that the template won’t have its own line in the text | empty | optional |
style | box style | CSS style for the whole box | empty | optional |
fontstyle | font style | CSS style for the text, also applied to the links. Useful for setting font color as that would be overridden by default link color. | empty | optional |
brackets | brackets | Put [brackets] around the links | empty | optional |
uselang | language | Set the template’s language. Not used if the template is transcluded on pages translated with the Translate extension. | empty | optional |
miniv | empty | deprecated | ||
viewplain | empty | deprecated | ||
fontcolor | font color | Set the font color. Deprecated, use |fontstyle = color:⧼color⧽ instead. | empty | deprecated |
thisbox | Text | Custom leading text | This box | optional |
|
<templatedata>JSON</templatedata> ./. {{TemplateBox}}
TemplateData is a way to store information about template parameters (the description of those and of the whole template) for both humans and machines. It is used by VisualEditor and possibly other tools like Upload Wizard. Existing template documentation Newly created template documentation and imports Wikipedia's help about TemplateData • Commons-specific information
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Additional information
The template is intended to be used in the following namespaces: no namespace specified
The template is intended to be used by the following user groups: no user group specified
Example
{{navbar|navbar/doc}}
renders as:
See also
- {{Tnavbar-collapsible}}: For use in conjunction with Collapsible tables, floats v • d • e opposite of the [hide]/[show] feature.
Localization
العربية ∙ বাংলা ∙ dansk ∙ Deutsch ∙ Deutsch (Sie-Form) ∙ English ∙ Esperanto ∙ español ∙ français ∙ ગુજરાતી ∙ עברית ∙ हिन्दी ∙ magyar ∙ Bahasa Indonesia ∙ italiano ∙ 日本語 ∙ 한국어 ∙ македонски ∙ Nederlands ∙ polski ∙ português ∙ русский ∙ svenska ∙ Türkçe ∙ українська ∙ Tiếng Việt ∙ 中文
This template makes use of {{Autotranslate}} and the translate extension. The layout of the template can be found under Template:navbar/layout.
Examples
| Options | Parameters | Produces... |
|---|---|---|
| Normal | {{navbar|Template Name}} |
|
| Different text | {{Navbar|Template Name|thisbox=This template}}
|
|
| No "This box:" text. | {{navbar|Template Name|plain=1}} |
|
| Short version. | {{navbar|Template Name|mini=1}} |
|
| Good for "blending" into text. | {{navbar|Template Name|nodiv=1}} |
Lorem This box: view • talk • edit Ipsum |
| Blended, no "This box:" text. | {{navbar|Template Name|plain=1|nodiv=1}} |
Lorem view • talk • edit Ipsum |
| Blended, short version. | {{navbar|Template Name|mini=1|nodiv=1}} |
Lorem v • d • e Ipsum |
| For a color option. | {{navbar|Template Name|fontstyle=color:green}} |