Template:Ambox: Difference between revisions
Jump to navigation
Jump to search
Created page with "{{#ifeq:{{{subst}}}|SUBST |{{#if:{{{name|}}} |{{error|Template {{tlx|{{{name}}}}} has been incorrectly substituted.}} }}[[Category:Pages with incorrectly substituted template..." |
No edit summary |
||
Line 1: | Line 1: | ||
{{# | <table class="metadata plainlinks ambox {{#switch:{{{type|}}} | ||
| speedy = ambox-speedy | |||
|{{ | | delete = ambox-delete | ||
| content = ambox-content | |||
| style = ambox-style | |||
| move = ambox-move | |||
| protection = ambox-protection | |||
| | | notice <!-- notice = default --> | ||
| #default = ambox-notice | |||
}}" style="{{{style|}}}"> | |||
<tr> | |||
{{#switch:{{{image|}}} | |||
| blank <!-- Fall back to "none", since deprecated. --> | |||
| none = <td class="mbox-empty-cell"></td> <!-- No image. Cell with some width or padding necessary for text cell to have 100% width. --> | |||
| #default = | |||
<td class="mbox-image"><div style="width: 52px;"> | |||
{{#if:{{{image|}}} | |||
| {{{image}}} | |||
| [[File:{{#switch:{{{type|}}} | |||
| speedy = Ambox speedy deletion.png | |||
| delete = Ambox deletion.png | |||
| content = Ambox content.png | |||
| style = Edit-clear.svg | |||
| move = Ambox move.png | |||
| protection = Ambox protection.png | |||
| notice <!-- notice = default --> | |||
| #default = Ambox notice.png | |||
}} | 40x40px |link=|alt=]] | |||
}}</div> | |||
</td> | |||
}} | |||
<td class="mbox-text" style="{{{textstyle|}}}"> {{{text}}} </td> | |||
{{#if:{{{imageright|}}} | |||
| {{#ifeq:{{{imageright|}}}|none | |||
| <!-- No image. --> | |||
| <td class="mbox-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 = <div style="text-align: center;">This message box is using an invalid "type={{{type|}}}" parameter and needs fixing.</div>[[Category:Message box parameter needs fixing|Main{{FULLPAGENAME}}]]<!-- Sort on namespace --> | |||
}} | |||
}} | |||
Revision as of 23:19, 28 February 2011
{{{text}}} |