Template:RouteBox
{{safesubst:#if:| [[{{{2}}}|{{{1}}}]] | {{{1}}} }}
{{#ifeq:routebox |doc
|
{{#ifeq:show |show
|| icon | This is a documentation subpage for Template:Terminate sentence It may contain usage information, categories and other content that is not part of the original {{#if: |{{{text2}}} |{{#if: |{{{text1}}} |{{#ifeq:Template |User |template template page |{{#if:Template |template page|article}}}}}}}}. |
}}{{#if:|
|{{#ifexist:Template:RouteBox
| [[Category:{{#switch:Template |Template=Template |Module=Module |User=User |#default=Wikipedia}} documentation pages]]
|
}}
}}
|
}}
| Warning | This template is used on approximately 9,900 pages and changes may be widely noticed. Test changes in the template's /sandbox or /testcases subpages, or in your own user subpage. Consider discussing changes on the talk page before implementing them. |
This template is similar to {{Color box}}, but provides for both wikilinks and text color and omits the contrasting border.
Usage
{{RouteBox|text|link|box color|text color|border=|bold=}}
|
can be abbreviated to {{rbox|…}}
|
|
text (bold) to be displayed in the box |
|
any valid wikilink; [[ and ]] are not required; can be omitted if no link is wanted
|
|
background color of the box; default is black; can be omitted if text color is not specified
|
|
optional; default is white |
|
optional; default is box color |
|
optional; default is yes |
Examples
{{RouteBox|Line|Line}} → {{safesubst:#if:Line| Line | Line }}
{{rbox|Circle line|Circle line (London Underground)|#{{rcr|London Underground|Circle}}|#{{rcr|London Underground|Piccadilly}}}} → {{safesubst:#if:Circle line (London Underground)| Circle line | Circle line }}
{{RouteBox|Text||bold=no}} → {{safesubst:#if:| [[|Text]] | Text }}
Variants
| Template | Description | Example | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| {{Color box}} | Color box size with black borders and text color. Standard size. | {{#if: | {{{2}}}| {{{2}}} }} | }} or {{#if:ORANGE | ORANGE| ORANGE }} | }} | ||||||||||
| {{Color box striped}} | Striped color box. Standard size. | {{{3}}} | }} | ||||||||||||||
| {{RouteBox}} | Borderless color box with text color and wikilinks. | ORANGE | ORANGE }} | ||||||||||||||
| {{Colorbull}} | Colored bullet with wikilinks. | [[{{{3}}}|{{#switch:{{{2}}} | circle|r|round = ● | diamond = ◆ | up|uptriangle = ▲ | dn|downtriangle = ▼ | lt|lefttriangle = ◀ | rt|righttriangle = ▶ | #default = ■
}}]]|{{#switch:{{{2}}} |
circle|r|round = ● | diamond = ◆ | up|uptriangle = ▲ | dn|downtriangle = ▼ | lt|lefttriangle = ◀ | rt|righttriangle = ▶ | #default = ■
}}}} |
| {{Legend inline}} | Color box size with black borders. Standard size. | {{#if: | }} | |||||||||||||
| {{Color sample}} | Color box size with black borders. Smaller size. | |||||||||||||||
| {{Swatch inline}} | orange|orange}} | |||||||||||||||
| {{Background color}} | orange{{safesubst:#switch:
{{safesubst:#if:
|
{{{demospace}}} | main | other
}} }} |
{{#ifexpr:1 < 7 OR 10.634053407262 < 7 AND 1.9747879003183 < 7|}}}} | other | #default =
}}{{#switch: {{#if:
|
{{{demospace}}} | Template | template | other
}} }} |
{{#ifexpr:1 < 7 OR 10.634053407262 < 7 AND 1.9747879003183 < 7|}}}} | other | #default =
}} | ||
| {{Rail color box}} | A version with more display options. Part of Module:Adjacent stations | ●, Orange | ||||||||||||||
| {{Diagonal split color box}} | Color box split diagonally. Standard size. | {{#ifexpr:{{#ifeq: |
0}} and {{#if:|1|0}} | {{#ifeq: | {{#if: | {{{4}}}| }} |
{{#if: | {{{4}}}| }} {{#if:|{{{3}}}| }}
|
{{{4}}}|{{#if:| | }}}} {{#if:|{{{3}}}|{{#if:| | }}}} }}}}
|
TemplateData
|=[https://bambots.brucemyers.com/TemplateParam.php?wiki=enwiki&template=%7B%7B%23if%3ARouteBox%7CRouteBox%7CRouteBox%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:RouteBox|Template:RouteBox|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:RouteBox|its|this}} TemplateData}}.
|None|none=[https://bambots.brucemyers.com/TemplateParam.php?wiki=enwiki&template=%7B%7B%23if%3ARouteBox%7CRouteBox%7CRouteBox%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:RouteBox|its|this}} TemplateData}}
|for|For=[https://bambots.brucemyers.com/TemplateParam.php?wiki=enwiki&template=%7B%7B%23if%3ARouteBox%7CRouteBox%7CRouteBox%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:RouteBox|Template:RouteBox|Template:RouteBox}}{{#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:RouteBox|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:RouteBox|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%3ARouteBox%7CRouteBox%7CRouteBox%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:RouteBox|Template:RouteBox|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:RouteBox|its|this}} TemplateData}}.
|None|none=[https://bambots.brucemyers.com/TemplateParam.php?wiki=enwiki&template=%7B%7B%23if%3ARouteBox%7CRouteBox%7CRouteBox%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:RouteBox|its|this}} TemplateData}}
|for|For=[https://bambots.brucemyers.com/TemplateParam.php?wiki=enwiki&template=%7B%7B%23if%3ARouteBox%7CRouteBox%7CRouteBox%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:RouteBox|Template:RouteBox|Template:RouteBox}}{{#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:RouteBox|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:RouteBox|its|this}} TemplateData}} }}}}
TemplateData for RouteBox
{{#if:
| {{{demospace}}}
| {{#ifeq:Template|Template
| template
| other
}}
}}
| template = {{safesubst:#if:{{safesubst:#ifeq:RouteBo|sandbox|1}}{{safesubst:#ifeq:RouteBox|doc|1}}||
}} | other | #default = }}
<templatedata> { "params": { "1": { "label": "text", "description": "text (bold by default) to be displayed in the box", "example": "Circle line", "type": "string", "suggested": true }, "2": { "label": "link", "description": "The name of the page to link towards; can be omitted if no link is wanted", "example": "Circle line (London Underground)", "type": "wiki-page-name" }, "3": { "label": "box color", "description": "background color of the box; can be omitted if text color is not specified", "example": "yellow", "type": "string", "default": "black", "suggested": true }, "4": { "label": "text color", "description": "color of the text", "example": "blue", "type": "string", "default": "white" }, "border": { "description": "color of the border; enabled by default", "example": "black", "type": "string", "default": "{{{3}}}" }, "bold": { "description": "bolds the text; enabled by default", "example": "no", "type": "string", "default": "yes" } }, "paramOrder": [ "1", "2", "3", "4", "border", "bold" ], "description": "Adds a colored box with no border.", "format": "inline" } </templatedata>
{{safesubst:#if:{{safesubst:#ifeq:RouteBo|sandbox|1}}{{safesubst:#ifeq:RouteBox|doc|1}}||
}}