Difference between revisions of "Template:Ambox"

From RimWorld Wiki
Jump to navigation Jump to search
m
(Can't be deleted - rwbox is dependent on it.)
 
(6 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{#ifeq:{{{subst}}}|SUBST
+
<onlyinclude><includeonly><table style="{{{style|}}}" class="plainlinks ambox {{#ifeq:{{{format|}}}|tiny|ambox-tiny}} {{#switch:{{{border|}}}
|{{#if:{{{name|}}}
+
  | red      = ambox-red
  |{{Error|Template {{tlx|{{{name}}}}} has been incorrectly substituted.}}
+
   | orange  = ambox-orange
}}[[Category:Pages with incorrectly substituted templates]]
+
   | yellow  = ambox-yellow
}}{{Ambox/{{#ifeq:{{{small}}}|left|small|core}}
+
   | purple   = ambox-purple
|type = {{{type|}}}
+
   | blue    = ambox-blue
|image = {{{image|}}}
+
   | green    = ambox-green
|smallimage = {{#if:{{{smallimage|}}}|{{{smallimage}}}|{{{image|}}}}}
+
   | gray    = ambox-gray
|imageright = {{{imageright|}}}
+
   | #default = ambox-green
|smallimageright = {{#if:{{{smallimageright|}}}|{{{smallimageright}}}|{{{imageright|}}}}}
+
}} {{{class|}}}">
|class = ambox-{{#switch:{{{type|}}}
+
<tr>
   |speedy = speedy
+
<td class="ambox-image">{{{image|[[File:{{{icon|Information.png{{!}}48px}}}|{{#ifeq:{{{format|}}}|tiny|x20px}}|alt=]]}}}</td>
   |delete = delete
+
<td class="ambox-text">{{{type|}}}
   |warning = warning
+
{{#if:{{{info|}}}|{{#ifeq:{{{format|}}}|tiny||<div class="amsmalltext">
   |content = content
+
{{{info}}}
   |style = style
+
</div>}}}}</td></tr></table></includeonly></onlyinclude><noinclude>
   |move = move
+
{{documentation}}
   |protection = protection
+
[[Category:Notice templates]]
   |notice|#default = notice
 
}} {{{class|}}}
 
|style = {{{style|}}}
 
|textstyle  = {{{textstyle|}}}
 
|smalltext  = {{{smalltext|}}}
 
|talk = {{#switch:{{{talk|¬}}}
 
  |¬        = <!-- No talk link used -->
 
  |        = {{#ifeq:{{FULLROOTPAGENAME}}|Template:{{PAGENAME:{{{name}}}}}|#}}
 
  |#default = {{{talk}}}
 
}}
 
|issue = {{#switch:{{{sect|¬}}}
 
  |¬ = <!-- No section parameter used -->
 
  |  = This article
 
  |This {{{sect}}}
 
}} {{{issue<includeonly>|</includeonly>}}} {{{text|}}}
 
|fix = {{{fix<includeonly>|</includeonly>}}}
 
|date = {{#switch:{{{date|¬}}}
 
  |¬        = <!-- No date used -->
 
  |         = {{#ifeq:{{FULLROOTPAGENAME}}|Template:{{PAGENAME:{{{name}}}}}|{{CURRENTMONTHNAME}} {{CURRENTYEAR}}}}
 
  |#default = {{{date}}}
 
}}
 
|info = {{{info|}}}
 
}}{{Category handler
 
|nocat={{{nocat|<noinclude>true</noinclude>}}}
 
|main={{Ambox/category
 
  |cat={{{cat|{{{category|}}}}}}
 
  |all={{{all|}}}
 
  |date={{{date|}}}
 
}}{{Ambox/category
 
  |cat={{{cat2|{{{category2|}}}}}}
 
  |all={{{all2|}}}
 
  |date={{{date|}}}
 
}}{{Ambox/category
 
  |cat={{{cat3|{{{category3|}}}}}}
 
  |all={{{all3|}}}
 
  |date={{{date|}}}
 
}}
 
|template={{#switch:Template:{{{name|}}}
 
  |{{FULLPAGENAME}} = [[Category:Article message templates]]{{#ifexpr:{{#ifeq:{{{issue|¬}}}|¬|1|0}}+{{#ifeq:{{{fix|¬}}}|¬|1|0}}+{{#ifeq:{{{subst|¬}}}|¬|1|0}}
 
  |[[Category:Article message templates with missing parameters|{{#expr:{{#ifeq:{{{issue|¬}}}|¬|1|0}}+{{#ifeq:{{{fix|¬}}}|¬|1|0}}+{{#ifeq:{{{subst|¬}}}|¬|1|0}}}}]]
 
  }}{{#if:{{{category|}}}{{{category2|}}}{{{category3|}}}
 
  |[[Category:Article message templates with missing parameters|C]]
 
  }}
 
  |Template:        = {{#ifeq:{{BASEPAGENAME}}|{{SUBPAGENAME}}|[[Category:Article message templates with missing parameters]]}}
 
}}
 
}}<noinclude>
 
{{Documentation}}
 
<!-- Add categories and interwikis to the /doc subpage, not here! -->
 
 
</noinclude>
 
</noinclude>

Latest revision as of 05:17, 26 July 2022

Documentation icon Template documentation[view] [edit] [history] [purge]

The template is a notice template

Named parameters[edit]

|icon=
image file name for use on the left, e.g. "Stub.png"
|image=
left (image) cell content, overrides |icon= if provided.
|type=
top line text
|info=
list of extra info
|border=
border colour (defaults to green)
red
ambox-red (serious issue)
yellow
ambox-yellow (mild issue)
green
ambox-green (good!)
purple
ambox-purple (technical change)
blue
ambox-blue (notice)
orange
ambox-orange (stub colour)
gray
ambox-gray
|format
tiny to display a small, left-aligned box showing only the |type= value; any other value displays the full ambox.
|style=
extra style parameters (unlikely to be used)

Examples[edit]

Default[edit]

Tiny[edit]

Red + image[edit]

Yellow[edit]

Green[edit]

Purple[edit]

Blue[edit]

Orange[edit]

Gray[edit]