Template:BadgeBox/doc: Difference between revisions

From Homecoming Wiki
Jump to navigation Jump to search
imported>Sekoia (historical)
(updating for new which= option)
imported>Sekoia (historical)
No edit summary
Line 22: Line 22:


<nowiki>{{BadgeBox|Badge Name|which=Type}}</nowiki>
<nowiki>{{BadgeBox|Badge Name|which=Type}}</nowiki>
Additionally, you can specify a width for the left using left=. You should provide a number, which will be treated as a width in pixels. This allows a series of badge boxes to line up well.


==Examples==
==Examples==
Line 60: Line 62:
{{BadgeBox|Badge vr months 075.png|Resolute|which=Veteran}}
{{BadgeBox|Badge vr months 075.png|Resolute|which=Veteran}}
{{BadgeBox|Badge vr months 075.png|Resolute|Custom description.|which=Veteran}}
{{BadgeBox|Badge vr months 075.png|Resolute|Custom description.|which=Veteran}}
Here is an example using the left= option:
: <nowiki>{{BadgeBox|Plague Stopper|left=72}}</nowiki>
: <nowiki>{{BadgeBox|Resolute|which=Veteran|left=72}}</nowiki>
{{BadgeBox|Plague Stopper|left=72}}
{{BadgeBox|Resolute|which=Veteran|left=72}}
<includeonly>
<includeonly>
[[Category:Badge Templates|{{PAGENAME}}]]
[[Category:Badge Templates|{{PAGENAME}}]]
</includeonly>
</includeonly>

Revision as of 19:54, 25 June 2012

This is a documentation subpage for Template:BadgeBox (see that page for the template itself).
It contains usage information, categories and other content that is not part of the original template page.

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}}

Note that some badges have a different graphic and/or a different description for heroes and villains. Most badges will work fine automatically (once set up), but some may require additional parameters to get the exact effect you want.

Additionally, you can supply the which= option to specify which of a set of disambig pages to refer to; the which= should refer to the parenthetical after the badge name.

{{BadgeBox|Badge Name|which=Type}}

Additionally, you can specify a width for the left using left=. You should provide a number, which will be treated as a width in pixels. This allows a series of badge boxes to line up well.

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:

[[|link=|alt=Badge]]


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

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

This will output:

[[|link=|alt=Badge]]


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

{{BadgeBox|Plague Stopper}}

This will output:

Badge

You were key in stopping a plague from overtaking Paragon City.


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:

[[|link=|alt=Badge]]

Here are some examples with the which= option:

{{BadgeBox|Resolute|which=Veteran}}
{{BadgeBox|Badge vr months 075.png|Resolute|which=Veteran}}
{{BadgeBox|Badge vr months 075.png|Resolute|Custom description.|which=Veteran}}
Badge
Hero
Against all odds you've withstood the challenges that have been thrown your way and came out on top. This badge has been granted to you for earning twenty six Reward Tokens.
Villain
Against all odds you've withstood the challenges that have been thrown your way and came out on top. This badge has been granted to you for earning twenty six Reward Tokens.
[[|link=|alt=Badge]]
[[|link=|alt=Badge]]

Here is an example using the left= option:

{{BadgeBox|Plague Stopper|left=72}}
{{BadgeBox|Resolute|which=Veteran|left=72}}
Badge
Badge