Template:VTE: Difference between revisions
mpfae>SWinxy m ({{Template shortcut}}) |
Storyteller (talk | contribs) m (1 revision imported: Supplementary Module/Template UL) |
(No difference)
|
Latest revision as of 09:25, 16 June 2024
The VTE template invokes the {{navbar}} template with the parameter mini set to 1.
For more information, see Template:Navbar/doc, which has been transcluded below for convenience.
style="background: #{{#switch:
{{#if: |
{{{demospace}}} | main | other
}} }} |
main = F0F2F5 | other | #default = CCFFCC
}}; font-size:87%; padding:0.2em 0.3em; text-align:{{safesubst:#if:|left|{{safesubst:#if:|left|center}}}}; {{safesubst:#if:|color: {{{fc}}};|}}" |
{{safesubst:#if: |
- | The following is a closed discussion. {{#switch:
{{#if: |
{{{demospace}}} | main | other
}} }} |
main = Template:FormattingError | other | #default = Please do not modify it.
}} }} | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
{{#ifeq:show |show |
}}{{#if: | |
{{#ifexist:Template:VTE | [[Category:{{#switch:Template |Template=Template |Module=Module |User=User |#default=Wikipedia}} documentation pages]] |
}} }} |
}}{{#ifeq:VTE|Navbar|
Usage[edit]General[edit]When one of the following examples is placed inside a given template (or block of content used for selective transclusion), it adds basic navbar navigational functionality:
If the page is moved or renamed the substituted text will need to be updated accordingly. Alternatively, you can use
|
{{#invoke:params|{{safesubst:#if:self | self}} | function
}}}} |
Error: Missing module name.
}} instead of <syntaxhighlight lang="wikitext" inline>{{subst:PAGENAME}}</syntaxhighlight> to keep track of the current location of the transcluded page:
When used in content that is selectively transcluded but which is also used as-is in its original location, this template should be wrapped in
|
close = | single | open | pair = <{{#switch:includeonly | categorytree=categorytree | charinsert=charinsert | ce=ce | chem=chem | gallery=gallery | graph=graph | hiero=hiero | includeonly=includeonly | indicator=indicator | imagemap=imagemap | inputbox=inputbox | mapframe=mapframe | maplink=maplink | math=math | math chem=math chem | noinclude=noinclude | nowiki=nowiki | onlyinclude=onlyinclude | poem=poem | pre=pre | ref=ref | references=references | score=score | section=section | source=source | syntaxhighlight=syntaxhighlight | templatedata=templatedata | templatestyles=templatestyles | timeline=timeline | #default=includeonly
}}{{#if:| {{{params}}}}} }}{{#switch:p |
close = | single = /> | open = > | pair = >...
}}{{#switch:p |
single | open = | close | pair = </includeonly>
}} markup, so that it only appears when transcluded. Font size and weight[edit]Font-size is 88% when used in a topical navbar template or in plain text, and 100% when nested in a navbox or infobox (because those templates' text size is already reduced; the "100%" is relative to the surrounding template's own content, not that of the entire page). The In a topical navbar, the weight is "normal"; when nested in a navbox or infobox, it inherits the style of the surrounding content. The middot bullets are bold for better visibility. Block level element[edit]The template generates block-level markup with
|
close = | empty|s|single|v|void | open | pair = <{{#if:|div|div}}{{#if:| {{{attribs}}}}}
}}{{#switch:pair |
close = | empty|s|single|v|void = /> | open = > | pair = {{#ifeq:div|!-- | >}}...
}}{{#switch:pair |
empty|s|single|v|void | open = | close | pair = {{#ifeq:div|!--|-->|</div>}}
}} tags, and therefore, any surrounding markup cannot include
|
close = | empty|s|single|v|void | open | pair = <{{#if:|span|span}}{{#if:| {{{attribs}}}}}
}}{{#switch:pair |
close = | empty|s|single|v|void = /> | open = > | pair = {{#ifeq:span|!-- | >}}...
}}{{#switch:pair |
empty|s|single|v|void | open = | close | pair = {{#ifeq:span|!--|-->|</span>}}
}} tags, which would cause a div-span-flip lint error. Examples[edit]Required parameters[edit]
Optional parameters[edit]
Note that to show the history, move, and watchlist links, Shortcut templates[edit]The {{view}} and {{v}} also support changing the shown links, for example only view and edit, or only view and talk:
Notes[edit]Navbar is contained within a
|
close = | empty|s|single|v|void | open | pair = <{{#if:|div|div}}{{#if:| {{{attribs}}}}}
}}{{#switch:pair |
close = | empty|s|single|v|void = /> | open = > | pair = {{#ifeq:div|!-- | >}}...
}}{{#switch:pair |
empty|s|single|v|void | open = | close | pair = {{#ifeq:div|!--|-->|</div>}}
}} in order to accommodate a horizontal unnumbered list. This means it cannot be placed inside a
|
close = | empty|s|single|v|void | open | pair = <{{#if:|span|span}}{{#if:| {{{attribs}}}}}
}}{{#switch:pair |
close = | empty|s|single|v|void = /> | open = > | pair = {{#ifeq:span|!-- | >}}...
}}{{#switch:pair |
empty|s|single|v|void | open = | close | pair = {{#ifeq:span|!--|-->|</span>}}
}} or other inline element, because the HTML Tidy extension will 'fix' situations where it finds block elements inside inline elements. Prepackaged[edit]
See also[edit][
] Compare different edit templates:
Templates with view, talk and edit links:
Other internal link templates, including:
TemplateData[edit]{{#if:|{{#switch:
|
=[https://bambots.brucemyers.com/TemplateParam.php?wiki=enwiki&template=%7B%7B%23if%3AVTE%7CVTE%7CVTE%7D%7D {{#ifeq:{{safesubst:#switch: {{{lc}}} | no | n | f | false | off | 0 = no | = no | ¬ = no | yes | y | t | true | on | 1 = yes | #default = no
}}|no|S|s}}ee a monthly parameter usage report] for {{#if:VTE|Template:VTE|this template}} in articles{{#ifeq:{{safesubst:#switch: y |
no | n | f | false | off | 0 = no | = no | ¬ = no | yes | y | t | true | on | 1 = yes | #default = no
}}|yes| based on {{#if:VTE|its|this}} TemplateData}}. |
none=[https://bambots.brucemyers.com/TemplateParam.php?wiki=enwiki&template=%7B%7B%23if%3AVTE%7CVTE%7CVTE%7D%7D {{#ifeq:{{safesubst:#switch: {{{lc}}} | no | n | f | false | off | 0 = no | = no | ¬ = no | yes | y | t | true | on | 1 = yes | #default = no
}}|no|P|p}}arameter usage report]{{#ifeq:{{safesubst:#switch: y |
no | n | f | false | off | 0 = no | = no | ¬ = no | yes | y | t | true | on | 1 = yes | #default = no
}}|yes| based on {{#if:VTE|its|this}} TemplateData}} |
For=[https://bambots.brucemyers.com/TemplateParam.php?wiki=enwiki&template=%7B%7B%23if%3AVTE%7CVTE%7CVTE%7D%7D {{#ifeq:{{safesubst:#switch: {{{lc}}} | no | n | f | false | off | 0 = no | = no | ¬ = no | yes | y | t | true | on | 1 = yes | #default = no
}}|no|P|p}}arameter usage report] for {{#if:VTE|Template:VTE|Template:VTE}}{{#ifeq:{{safesubst:#switch: y |
no | n | f | false | off | 0 = no | = no | ¬ = no | yes | y | t | true | on | 1 = yes | #default = no
}}|yes| based on {{#if:VTE|its|this}} TemplateData}}. |
#default=[1]{{#ifeq:{{safesubst:#switch: y | no | n | f | false | off | 0 = no | = no | ¬ = no | yes | y | t | true | on | 1 = yes | #default = no
}}|yes| based on {{#if:VTE|its|this}} TemplateData}} }}|This is the {{#if:|TemplateData|TemplateData}} for this template used by TemplateWizard, VisualEditor and other tools. {{#switch: |
=[https://bambots.brucemyers.com/TemplateParam.php?wiki=enwiki&template=%7B%7B%23if%3AVTE%7CVTE%7CVTE%7D%7D {{#ifeq:{{safesubst:#switch: {{{lc}}} | no | n | f | false | off | 0 = no | = no | ¬ = no | yes | y | t | true | on | 1 = yes | #default = no
}}|no|S|s}}ee a monthly parameter usage report] for {{#if:VTE|Template:VTE|this template}} in articles{{#ifeq:{{safesubst:#switch: y |
no | n | f | false | off | 0 = no | = no | ¬ = no | yes | y | t | true | on | 1 = yes | #default = no
}}|yes| based on {{#if:VTE|its|this}} TemplateData}}. |
none=[https://bambots.brucemyers.com/TemplateParam.php?wiki=enwiki&template=%7B%7B%23if%3AVTE%7CVTE%7CVTE%7D%7D {{#ifeq:{{safesubst:#switch: {{{lc}}} | no | n | f | false | off | 0 = no | = no | ¬ = no | yes | y | t | true | on | 1 = yes | #default = no
}}|no|P|p}}arameter usage report]{{#ifeq:{{safesubst:#switch: y |
no | n | f | false | off | 0 = no | = no | ¬ = no | yes | y | t | true | on | 1 = yes | #default = no
}}|yes| based on {{#if:VTE|its|this}} TemplateData}} |
For=[https://bambots.brucemyers.com/TemplateParam.php?wiki=enwiki&template=%7B%7B%23if%3AVTE%7CVTE%7CVTE%7D%7D {{#ifeq:{{safesubst:#switch: {{{lc}}} | no | n | f | false | off | 0 = no | = no | ¬ = no | yes | y | t | true | on | 1 = yes | #default = no
}}|no|P|p}}arameter usage report] for {{#if:VTE|Template:VTE|Template:VTE}}{{#ifeq:{{safesubst:#switch: y |
no | n | f | false | off | 0 = no | = no | ¬ = no | yes | y | t | true | on | 1 = yes | #default = no
}}|yes| based on {{#if:VTE|its|this}} TemplateData}}. |
#default=[2]{{#ifeq:{{safesubst:#switch: y | no | n | f | false | off | 0 = no | = no | ¬ = no | yes | y | t | true | on | 1 = yes | #default = no
}}|yes| based on {{#if:VTE|its|this}} TemplateData}} }}}} TemplateData for VTE {{#switch:{{#if: |
{{{demospace}}} | Template | template | other
}} }} |
sandbox|1}}{{#ifeq:VTE|doc|1}} |
}} |
other | #default =
}} When placed inside a given template, it adds navbar navigational functionality
}} |