Jump to content

Template:RouteBox/doc

From Wikihoc

{{#ifeq:doc |doc

    | 

{{#ifeq:show |show

|

        }}{{#if:|
         |{{#ifexist:Template:RouteBox
                  | [[Category:{{#switch:Template |Template=Template |Module=Module |User=User |#default=Wikipedia}} documentation pages]]
                  | 
                 }}
        }}
    | 
   }}

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=}}

  • RouteBox
can be abbreviated to {{rbox|…}}
  • text
text (bold) to be displayed in the box
  • link
any valid wikilink; [[ and ]] are not required; can be omitted if no link is wanted
  • box color
background color of the box; default is black; can be omitted if text color is not specified
  • text color 
optional; default is white
  • border=
optional; default is box color
  • bold=
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

Color box templates
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:
   
}}
   
{{#if:
   
}}
  {{{4}}}|   }}
   
}}
{{#if: {{{4}}}| }}
{{#if:|{{{3}}}|   }}
  {{{4}}}|{{#if:| |   }}}}
{{#if:|{{{3}}}|{{#if:| |   }}}}
}}}}

TemplateData

{{#if:|{{#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=[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

{{#switch:

 {{#if:
 | {{{demospace}}}    
 | {{#ifeq:Template|Template
   | template
   | other
   }}
 }}

| template = {{safesubst:#if:{{safesubst:#ifeq:doc|sandbox|1}}{{safesubst:#ifeq:doc|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>