Template:BadgeBox: Difference between revisions

From Homecoming Wiki
Jump to navigation Jump to search
imported>Sekoia (historical)
(adding documentation)
imported>Sekoia (historical)
(trying to make it more automatic)
Line 1: Line 1:
<includeonly><div style="margin: 0.5em;">
<includeonly>{{#if: {{{2|}}}|<div style="margin: 0.5em;">
{|  style="background-color: #F4F4FF; border: 1px solid #AAAAFF;"
{|  style="background-color: #F4F4FF; border: 1px solid #AAAAFF;"
| style="vertical-align: top; padding: 0.25em;" | [[Image:{{{1}}}]]
| style="vertical-align: top; padding: 0.25em;" | [[Image:{{{1}}}]]
| style="width:100%; padding: 0.25em;" | '''[[{{{2}}} Badge|{{{2}}}]]'''<br>
| style="width:100%; padding: 0.25em;" | '''[[{{{2}}} Badge|{{{2}}}]]'''<br>
{{if|test={{{3|}}}|then={{{3}}}|else={{#dpl: title={{{2}}} Badge | includepage=#Description}}}}
{{if|test={{{3|}}}|then={{{3}}}|else={{#dpl: title={{{2}}} Badge | includepage=#Description}}}}
|}</div></includeonly><noinclude>__NOTOC__
|}</div>|<div style="margin: 0.5em;">
{|  style="background-color: #F4F4FF; border: 1px solid #AAAAFF;"
| style="vertical-align: top; padding: 0.25em;" | {{#dpl: title={{{1}}} Badge | includepage={Image} }}
| style="width:100%; padding: 0.25em;" | '''[[{{{1}}} Badge|{{{1}}}]]'''<br>
{{#dpl: title={{{1}}} Badge | includepage=#Description}}
|}</div>}}</includeonly><noinclude>__NOTOC__
==Overview==
==Overview==
This template is used to generate a badge box for displaying the badge graphic, badge name, and badge description for a badge.
This template is used to generate a badge box for displaying the badge graphic, badge name, and badge description for a badge.
==Usage==
==Usage==
There are two ways to use this template.
There are three ways to use this template.


The first way is to specify the graphic, the badge name, and the badge description as thus:
The first way is to specify the graphic, the badge name, and the badge description as thus:
Line 17: Line 22:


<nowiki>{{BadgeBox|Image.png|Badge Name}}</nowiki>
<nowiki>{{BadgeBox|Image.png|Badge Name}}</nowiki>
The third way is to omit the graphic and the description. If omitted, they will both be automatically filled in from the badge's article using the section titled "Description" and the image displayed through the {{tl|Image}} template. (If either do not exist, an error occurs.)
<nowiki>{{BadgeBox|Badge Name}}</nowiki>


==Examples==
==Examples==
Line 31: Line 40:
This will output:
This will output:
{{BadgeBox|badge_stature_03.png|Plague Stopper}}
{{BadgeBox|badge_stature_03.png|Plague Stopper}}
Here is an example template call for a badge, using the automatic description and image:
: <nowiki>{{BadgeBox|Plague Stopper}}</nowiki>
This will output:
{{BadgeBox|Plague Stopper}}





Revision as of 09:33, 11 May 2007

Overview

This template is used to generate a badge box for displaying the badge graphic, badge name, and badge description for a badge.

Usage

There are three ways to use this template.

The first way is to specify the graphic, the badge name, and the badge description as thus:

{{BadgeBox|Image.png|Badge Name|Description}}

The second way is to omit the description. If the description is omitted, the description will automatically be filled in from the badge's article using the section titled "Description". (If there is no such section, an error occurs.)

{{BadgeBox|Image.png|Badge Name}}

The third way is to omit the graphic and the description. If omitted, they will both be automatically filled in from the badge's article using the section titled "Description" and the image displayed through the {{Image}} template. (If either do not exist, an error occurs.)

{{BadgeBox|Badge Name}}

Examples

Here is an example template call for a badge, providing a custom description:

{{BadgeBox|badge_stature_03.png|Plague Stopper|Custom description.}}

This will output:

{


Here is an example template call for a badge, using the automatic description:

{{BadgeBox|badge_stature_03.png|Plague Stopper}}

This will output:

{

Here is an example template call for a badge, using the automatic description and image:

{{BadgeBox|Plague Stopper}}

This will output: style="background-color: #F4F4FF; border: 1px solid #AAAAFF;"


Here is an example template call showing how to suppress the description completely:

{{BadgeBox|badge_stature_03.png|Plague Stopper|3=&nbsp;}}

This will output:

{