Difference between revisions of "Template:Ambox"

From CWCki
Jump to navigation Jump to search
m (Added documentation.)
(Added usage. Changed images in template to ones actually available on sonichu.com. Recategorized as metatemplate.)
Line 12: Line 12:
   | <nowiki/>
   | <nowiki/>
{{!}} class="mbox-image" {{!}} {{#switch:{{{image|{{{type|}}}}}}
{{!}} class="mbox-image" {{!}} {{#switch:{{{image|{{{type|}}}}}}
     | serious  = [[Image:Stop hand nuvola.svg|40px]]
     | serious  = [[Image:RosechuTheIncredibleLioness.jpg|40px]]
     | content  = [[Image:Emblem-important.svg|40px]]
     | content  = [[Image:Emblem-important.svg|40px]]
     | style    = [[Image:Broom icon.svg|40px]]
     | style    = [[Image:100_2246.JPG|40px]]
     | merge    = [[Image:Merge-split-transwiki default.svg]]
     | merge    = [[Image:Merge-split-transwiki default.svg]]
     | notice  = [[Image:Info non-talk.png|40px]]
     | notice  = [[Image:Info non-talk.png|40px]]
     | blank    = <!-- empty image cell -->
     | blank    = <!-- empty image cell -->
     | #default = {{{image|[[Image:Info non-talk.png|40px]]}}}
     | #default = {{{image|[[Image:ColossalChan.jpg|40px]]}}}
   }}
   }}
}}
}}
Line 26: Line 26:
}}
}}
{{!}}-
{{!}}-
{{!}}}<noinclude>
{{!}}}<noinclude>{{usage|1=This metatemplate is used to create article message boxes.
{{documentation}}
 
</noinclude>
The format for using this template is as follows:]]<br />
 
The template is set up to use a default image if none is selected. 
 
'''<pre>{{Ambox|text=This example message box displays the default image.}}</pre>'''
 
- Displays:{{Ambox|text=This '''example''' message box displays the default image}}
 
Additionally, if one of the keywords in the template is used, the box will display the image set for that keyword. 
 
'''<pre>{{Ambox|image=serious|text=This '''example''' message box displays the "serious" image.}}</pre>'''
 
- Displays:{{Ambox|image=serious|text=This '''example''' message box displays the "serious" image}}
 
'''<pre>{{Ambox|image=style|text=This '''example''' message box displays the "style" image.}}</pre>'''
 
- Displays:{{Ambox|image=style|text=This '''example''' message box displays the "style" image}}
 
 
If the keyword "blank" is used, no picture is displayed.
 
'''<pre>{{Ambox|image=blank|text=This '''example''' message box displays the no image.}}</pre>'''
 
- Displays:{{Ambox|image=blank|text=This '''example''' message box displays the no image}}
 
Finally, you can enter any other image you choose.  It is best to use a width of 40px. 
 
'''<pre>{{Ambox|image=[[Image:SonichuOriginal.jpg|40px]]|text=This '''example''' message box features a picture of [[Sonichu]].}}</pre>'''
 
- Displays:{{Ambox|image=[[Image:SonichuOriginal.jpg|40px]]|text=This '''example''' message box features a picture of [[Sonichu]]}}
}}
 
[[Category:Metatemplates|{{PAGENAME}}]]</noinclude>

Revision as of 00:18, 1 December 2010

Usage

These usage notes will not be included in articles bearing this template.

This metatemplate is used to create article message boxes.

The format for using this template is as follows:]]

The template is set up to use a default image if none is selected.

{{Ambox|text=This example message box displays the default image.}}

- Displays:

Additionally, if one of the keywords in the template is used, the box will display the image set for that keyword.

{{Ambox|image=serious|text=This '''example''' message box displays the "serious" image.}}

- Displays:

{{Ambox|image=style|text=This '''example''' message box displays the "style" image.}}

- Displays:


If the keyword "blank" is used, no picture is displayed.

{{Ambox|image=blank|text=This '''example''' message box displays the no image.}}

- Displays:

Finally, you can enter any other image you choose. It is best to use a width of 40px.

{{Ambox|image=[[Image:SonichuOriginal.jpg|40px]]|text=This '''example''' message box features a picture of [[Sonichu]].}}

- Displays: