Difference between revisions of "Template:Ambox"

From Self-sufficiency
Jump to: navigation, search
m (1 revision)
m (link)
Line 1: Line 1:
<!--{{Ambox}} begin-->{{#switch:{{{small|}}}
+
{{#ifeq:{{{subst}}}|SUBST
| left =
+
|{{#if:{{{name|}}}
  {{Ambox/core
+
   |{{error|Template {{tlx|{{{name}}}}} has been incorrectly substituted.}}
  | small      = left
+
}}[[Category:Pages with incorrectly substituted templates]]
  | type      = {{{type|}}}
+
}}{{#ifeq:{{{small}}}|left
   | image      = {{#if:{{{smallimage|}}}
+
|{{Ambox/core
                | {{{smallimage}}}
+
   |small     = left
                | {{{image|}}}
+
   |type      = {{{type|}}}
                }}
+
   |image      = {{#if:{{{smallimage|}}}
  | imageright = {{#if:{{{smallimageright|}}}
+
  |{{{smallimage}}}
                | {{{smallimageright}}}
+
  |{{{image|}}}
                | {{{imageright|}}}
+
                }}
+
   | style     = {{{style|}}}
+
   | textstyle  = {{{textstyle|}}}
+
   | text      = {{#if:{{{smalltext|}}}
+
                | {{{smalltext}}}  
+
                | {{{text}}}
+
                }}
+
 
   }}
 
   }}
| #default =  
+
  |imageright = {{#if:{{{smallimageright|}}}
  {{Ambox/core
+
  |{{{smallimageright}}}
  | type      = {{{type|}}}
+
  |{{{imageright|}}}
  | image      = {{{image|}}}
+
  | imageright = {{{imageright|}}}
+
  | style      = {{{style|}}}
+
  | textstyle  = {{{textstyle|}}}
+
  | text      = {{{text}}}
+
 
   }}
 
   }}
}}<!--
+
  |class      = {{{class|}}}
 
+
  |style      = {{{style|}}}
--><includeonly>{{#ifeq:{{BASEPAGENAME}}|{{SUBPAGENAME}}|{{#ifeq:{{NAMESPACE}}|Template|[[Category:Article message boxes]]}}}}</includeonly><!--
+
  |textstyle  = {{{textstyle|}}}
 
+
  |text      = {{#if:{{{smalltext|}}}
--><!--{{Ambox}} end--><noinclude>
+
  |{{{smalltext}}}
 +
  |{{{text}}}
 +
  }}
 +
}}
 +
|{{Ambox/core
 +
  |type      = {{{type|}}}
 +
  |image      = {{{image|}}}
 +
  |imageright = {{{imageright|}}}
 +
  |class      = {{{class|}}}
 +
  |style      = {{{style|}}}
 +
  |textstyle  = {{{textstyle|}}}
 +
  |text      = {{{text}}}
 +
  |date      = {{#ifeq:{{FULLROOTPAGENAME}}|Template:{{PAGENAME:{{{name}}}}}
 +
  |{{#ifeq:{{{date|¬}}}|¬||{{CURRENTMONTHNAME}} {{CURRENTYEAR}}}}
 +
  |{{{date|}}}
 +
  }}
 +
}}
 +
}}{{category handler
 +
|main={{ambox/category
 +
  |cat={{{cat|{{{category|}}}}}}
 +
  |date={{{date|}}}
 +
  |all={{{all|}}}
 +
}}
 +
|template={{#ifeq:{{BASEPAGENAME}}|{{SUBPAGENAME}}|<!--We are on a rootpage, not a /doc or /sandbox page-->{{#ifeq:{{{nocat|}}}|true
 +
    | <!--Don't categorise-->
 +
    | [[Category:Article message boxes|{{BASEPAGENAME}}]]
 +
    }}
 +
  }}
 +
}}{{#ifeq:{{FULLPAGENAME}}|Template:{{PAGENAME:{{{name}}}}}
 +
|{{#ifeq:{{{doc}}}|no|
 +
  |{{documentation}}<!-- Transclude documentation on template page -->
 +
}}
 +
}}<noinclude>
  
 
{{Documentation}}
 
{{Documentation}}
 
<!-- Add categories and interwikis to the /doc subpage, not here! -->
 
<!-- Add categories and interwikis to the /doc subpage, not here! -->
 
</noinclude>
 
</noinclude>

Revision as of 18:14, 3 December 2011