Difference between revisions of "Template:Ambox"

From Game Detectives Wiki
Jump to: navigation, search
[unchecked revision][unchecked revision]
m (81 revisions from w:en:Template:Ambox: Needed for Template:Mbox)
(update from en.wiki: https://en.wikipedia.org/w/index.php?title=Template:Ambox&action=edit)
Line 1: Line 1:
 
{{#ifeq:{{{subst}}}|SUBST
 
{{#ifeq:{{{subst}}}|SUBST
 
  |{{#if:{{{name|}}}
 
  |{{#if:{{{name|}}}
   |{{Error|Template {{Tlx|{{{name}}}}} has been incorrectly substituted.}}
+
   |{{Error|Template {{tlx|{{{name}}}}} has been incorrectly substituted.}}
 
  }}[[Category:Pages with incorrectly substituted templates]]
 
  }}[[Category:Pages with incorrectly substituted templates]]
}}{{#ifeq:{{{small}}}|left
+
}}{{Ambox/{{#ifeq:{{{small}}}|left|small|core}}
  |{{Ambox/core
+
  |type = {{{type|}}}
  |small      = left
+
|image = {{{image|}}}
  |type      = {{{type|}}}
+
|smallimage = {{#if:{{{smallimage|}}}|{{{smallimage}}}|{{{image|}}}}}
  |image      = {{#if:{{{smallimage|}}}
+
|imageright = {{{imageright|}}}
  |{{{smallimage}}}
+
|smallimageright = {{#if:{{{smallimageright|}}}|{{{smallimageright}}}|{{{imageright|}}}}}
  |{{{image|}}}
+
|class = ambox-{{#switch:{{{type|}}}
  }}
+
  |speedy = speedy
  |imageright = {{#if:{{{smallimageright|}}}
+
  |delete = delete
  |{{{smallimageright}}}
+
  |content = content
  |{{{imageright|}}}
+
   |style = style
  }}
+
  |move = move
  |class     = {{{class|}}}
+
  |protection = protection
   |style     = {{{style|}}}
+
  |notice|#default = notice
  |textstyle  = {{{textstyle|}}}
+
}} {{{class|}}}
  |text      = {{#if:{{{smalltext|}}}
+
|style = {{{style|}}}
  |{{{smalltext}}}
+
|textstyle  = {{{textstyle|}}}
  |{{#if:{{{issue|}}}
+
|smalltext  = {{{smalltext|}}}
    |{{{issue}}}
+
|talk = {{#switch:{{{talk|¬}}}
    |{{{text}}}
+
  |¬        = <!-- No talk link used -->
  }}
+
  |        = {{#ifeq:{{FULLROOTPAGENAME}}|Template:{{PAGENAME:{{{name}}}}}|#}}
   }}
+
   |#default = {{{talk}}}
 
  }}
 
  }}
  |{{Ambox/core
+
  |issue = {{#switch:{{{sect|¬}}}
  |type      = {{{type|}}}
+
  |¬ = <!-- No section parameter used -->
  |image      = {{{image|}}}
+
  | = This article
  |imageright = {{{imageright|}}}
+
  |This {{{sect}}}
  |class      = {{{class|}}}
+
}} {{{issue<includeonly>|</includeonly>}}} {{{text|}}}
  |style      = {{{style|}}}
+
|fix = {{{fix<includeonly>|</includeonly>}}}
  |textstyle  = {{{textstyle|}}}
+
|date = {{#switch:{{{date|¬}}}
  |text      = {{{text|}}} {{{issue<includeonly>|</includeonly>}}}<span class="hide-when-compact"> {{#switch:{{{talk|¬}}}
+
  |¬        = <!-- No date used -->
        = <!-- No talk link used -->
+
  |        = {{#ifeq:{{FULLROOTPAGENAME}}|Template:{{PAGENAME:{{{name}}}}}|{{CURRENTMONTHNAME}} {{CURRENTYEAR}}}}
  |         = {{#ifeq:{{FULLROOTPAGENAME}}|Template:{{PAGENAME:{{{name}}}}}|&#32;More details and relevant discussion can be found on the [[{{TALKPAGENAME}}|talk page]].}}
+
  |#default = {{{date}}}
  |#default = {{#ifexist:{{#ifeq:{{TALKPAGENAME:{{{talk}}}}}|{{FULLPAGENAME:{{{talk}}}}}
 
    |{{{talk}}}
 
    |{{TALKPAGENAME}}
 
    }}
 
    |&#32;More details and relevant discussion may be found on {{#ifeq:{{TALKPAGENAME:{{{talk}}}}}|{{FULLPAGENAME:{{{talk}}}}}
 
    |[[{{{talk}}}|{{FULLPAGENAME:{{{talk}}}}}]]
 
    |the [[{{TALKPAGENAME}}#{{{talk}}}|talk page]]
 
    }}.
 
  }}
 
  }} {{{fix<includeonly>|</includeonly>}}}</span>{{#switch:{{{date|¬}}}
 
  |¬        = <!-- No date used -->
 
  |        = {{#ifeq:{{FULLROOTPAGENAME}}|Template:{{PAGENAME:{{{name}}}}}|&#32;<small>''({{CURRENTMONTHNAME}} {{CURRENTYEAR}})''</small>}}
 
  |#default = &#32;<small>''({{{date}}})''</small>
 
  }}<span class="hide-when-compact"> {{{info|}}}</span>
 
 
  }}
 
  }}
 +
|info = {{{info|}}}
 
}}{{Category handler
 
}}{{Category handler
  |nocat={{{nocat|}}}
+
  |nocat={{{nocat|<noinclude>true</noinclude>}}}
 
  |main={{Ambox/category
 
  |main={{Ambox/category
 
   |cat={{{cat|{{{category|}}}}}}  
 
   |cat={{{cat|{{{category|}}}}}}  
Line 66: Line 53:
 
   |date={{{date|}}}
 
   |date={{{date|}}}
 
  }}
 
  }}
  |template={{#switch:Template:{{{name|<noinclude>Ambox</noinclude>}}}
+
  |template={{#switch:Template:{{{name|}}}
  |{{FULLPAGENAME}} = [[Category:Article message templates]]{{#ifexpr:{{#ifeq:{{{issue|¬}}}|¬|1|0}}+{{#ifeq:{{{fix|¬}}}|¬|1|0}}+{{#ifeq:{{{subst|¬}}}|¬|1|0}}
+
  |{{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}}}}]]
+
  |[[Category:Article message templates with missing parameters|{{#expr:{{#ifeq:{{{issue|¬}}}|¬|1|0}}+{{#ifeq:{{{fix|¬}}}|¬|1|0}}+{{#ifeq:{{{subst|¬}}}|¬|1|0}}}}]]
  }}{{#if:{{{category|}}}{{{category2|}}}{{{category3|}}}
+
  }}{{#if:{{{category|}}}{{{category2|}}}{{{category3|}}}
    |[[Category:Article message templates with missing parameters|C]]
+
  |[[Category:Article message templates with missing parameters|C]]
  }}
+
  }}
  |Template:        = {{#ifeq:{{BASEPAGENAME}}|{{SUBPAGENAME}}|[[Category:Article message templates with missing parameters]]}}
+
  |Template:        = {{#ifeq:{{BASEPAGENAME}}|{{SUBPAGENAME}}|[[Category:Article message templates with missing parameters]]}}
 
  }}
 
  }}
 
}}<noinclude>
 
}}<noinclude>

Revision as of 15:55, 13 July 2012

Template:Category handler <templatestyles src="Module:Documentation/styles.css"></templatestyles>
Template documentation[view] [edit] [history] [purge]
Description

This is the {{Ambox}} or Article message box meta-template.

Usage
{{Ambox|type=content|text=my text here}}, or
{{Ambox|type=speedy|text=my text here}}, etc
type

The type parameter defines the color of the left bar, and the image that is used by default. The type is chosen not on aesthetics but is based on the type of issue that the template describes. The seven available types and their default images are shown below.

If no type parameter is given the template defaults to |type=notice.

See also