Template:Building link

Overview
This template makes icons and short wiki links to a building's page. This template standardizes the display of icons and buildings throughout the wiki and simplifies the amount of writing needed.

A shortcut template also exists,, and its use is encouraged to make writing links even easier.

Usage
This template is used like this:. Use the name of the building as it appears in the game.

Since the rendering of the template ends in a standard wikilink, you can append an s after the template to write the plural of the building. Just like a regular wiki link,  yields Kilns, plural, with the s included in the link text.

Giving the template a building name will result in a short link to the wiki page for that building. This is useful in-line with text in paragraphs, where an icon would be too small to recognize but anything large enough to recognize would disrupt the display of the lines of text when it tries to wrap around the icon.

Telling the template what size to make the icon will add an icon before the name of the building that also links to the wiki page. This is useful when creating tables where the building icon aids recognition and where there is space to do so, for example in a table. If the building is not known to the data modules behind the scenes, an error will appear.

The default is no icon, for use in-line with text. You can also use,  , or   to describe the desired size of the icon, as you can see below.

Here are ways to call the template and the expected result:

Examples
The following are generated by calling the template, as shown in the examples in the table above.

1.  yields:

2.  yields:

med

3.  yields:

large

4.  yields:

huge

The following are error messages generated by calling the template incorrectly.

5. With no arguments,  yields:



6. With the name of something that doesn't exist in the game,  yields:



7. With no building but an icon size,  yields:



Finally, providing an icon size that is not recognized does not break the template.

8. With a valid building but invalid icon size,  yields: