Difference between revisions of "Template:Ambox"

From FamilySearch Wiki
Jump to: navigation, search
m
(rollback to 14:16, 25 January 2012)
(13 intermediate revisions by 4 users not shown)
Line 1: Line 1:
<table class="metadata plainlinks ambox
+
{{#ifeq:{{{subst}}}|SUBST
{{#switch:{{{type|}}}
+
|{{#if:{{{name|}}}
| speedy    = ambox-speedy
+
  |{{Error|Template {{Tlx|{{{name}}}}} has been incorrectly substituted.}}
| delete    = ambox-delete
+
}}[[Category:Pages with incorrectly substituted templates]]
| content    = ambox-content
+
}}{{#ifeq:{{{small}}}|left
| style     = ambox-style
+
|{{Ambox/core
| move       = ambox-move
+
  |small     = left
| protection = ambox-protection
+
  |type       = {{{type|}}}
| notice    <!-- notice = default -->
+
  |image      = {{#if:{{{smallimage|}}}
| #default   = ambox-notice
+
  |{{{smallimage}}}
}}" style="{{{style|}}}">
+
  |{{{image|}}}
<tr>
+
  }}
{{#ifeq:{{{image|}}}|none
+
  |imageright = {{#if:{{{smallimageright|}}}
| <!-- No image. Cell with some width or padding necessary for text cell to have 100% width. --><td style="border: none; padding: 1px;"></td>
+
  |{{{smallimageright}}}
| <td class="ambox-image"><div style="width: 52px;">
+
  |{{{imageright|}}}
  {{#ifeq:{{{image|}}}|blank
+
  }}
   | &nbsp;
+
   |class      = {{{class|}}}
   | {{#if:{{{image|}}}
+
  |style     = {{{style|}}}
    | {{{image}}}
+
  |textstyle  = {{{textstyle|}}}
    | {{#switch:{{{type|}}}
+
  |text      = {{#if:{{{smalltext|}}}
      | speedy    = [[Image:Ambox speedy deletion.png|40x40px]]
+
  |{{{smalltext}}}
      | delete    = [[Image:Ambox deletion.png|40x40px]]
+
  |{{{text}}}
      | content    = <!--[[Image:Ambox content.png|40x40px]]-->
+
  }}
      | style      = [[Image:Ambox style.png|40x40px]]
+
}}
      | move      = [[Image:Ambox move.png|40x40px]]
+
|{{Ambox/core
      | protection = [[Image:Ambox protection.png|40x40px]]
+
  |type      = {{{type|}}}
      | notice    <!-- notice = default -->
+
  |image      = {{{image|}}}
      | #default  = [[Image:Ambox notice.png|40x40px]]
+
  |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|}}}}}}  
 +
  |all={{{all|}}}
 +
  |cat2={{{cat2|{{{category2|}}}}}}  
 +
  |all2={{{all2|}}}
 +
  |cat3={{{cat3|{{{category3|}}}}}}
 +
  |all3={{{all3|}}}
 +
  |date={{{date|}}}
 +
}}
 +
|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}}]]
 
     }}
 
     }}
   }}</div></td>
+
   }}
}}
+
}}{{#ifeq:{{FULLPAGENAME}}|Template:{{PAGENAME:{{{name}}}}}
<td class="ambox-text" style="{{{textstyle|}}}"> {{{text}}} </td>
+
|{{#ifeq:{{{doc}}}|no|
{{#if:{{{imageright|}}}
+
   |{{Documentation}}<!-- Transclude documentation on template page -->
| <td class="ambox-imageright"><div style="width: 52px;"> {{{imageright}}} </div></td>
+
}}
}}
 
</tr>
 
</table><!-- Detect and report usage with faulty "type" parameter:
 
-->{{#switch:{{{type|}}}
 
|  <!-- No type fed, is also valid input -->
 
| speedy
 
| delete
 
| content
 
| style
 
| move
 
| protection
 
| notice    =    <!-- Do nothing, valid "type" -->
 
| #default   = [[Category:Ambox templates using deprecated types|{{main other|Main:}}{{FULLPAGENAME}}]]<!-- Sort on namespace -->
 
 
}}<noinclude>
 
}}<noinclude>
 +
{{Documentation}}
 
<!-- Add categories and interwikis to the /doc subpage, not here! -->
 
<!-- Add categories and interwikis to the /doc subpage, not here! -->
[[Category:Templates]]
 
 
</noinclude>
 
</noinclude>

Revision as of 19:10, 7 March 2013

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