Difference between revisions of "Template:Infoicon/doc"

From Captain of Industry Wiki
Jump to: navigation, search
(+plural param, clarification, improve examples)
(Lets make this a little more colorful and lively. Added a gotcha to pluralization and a description for images which are too large to use properly.)
Line 1: Line 1:
;Purpose
;Purpose
:This template provides a method to rapidly include an icon and link inline with text, such as inside of a paragraph.
:This template provides a method to rapidly include an icon and link inline with text, such as inside of a paragraph or in a bulleted list.


;Automations
;Automations
Line 8: Line 8:
:The template accepts up to three parameters:
:The template accepts up to three parameters:
::<code>{{{1}}}</code> = image name</code>
::<code>{{{1}}}</code> = image name</code>
::<code>symbolonly = yes</code> (optional)
::<code>symbolonly = yes</code> (optional)(rare)
::<code>plural = s</code> (optional)(recommend "s" or "es" or "esses")
::<code>link = yes</code> (optional). Adds a text hyperlink to the article name. However, please do not [[Wikipedia:Manual of Style/Linking#Duplicate and repeat links|overuse]] this.
::<code>plural = s</code> (optional). Generally "s" or "es" as a plural suffix.
:::For irregular plural suffixes like "knife" → "knives", instead use <code>symbolonly</code> and manually provide the link.


;Examples
;Examples
* {{t|infoicon}} -> {{infoicon}}
* {{t|infoicon}} {{infoicon}}
* {{t|infoicon|World Map}} -> {{infoicon|World Map}}
* {{t|infoicon|Corn}} {{infoicon|Corn}}
* {{t|infoicon|World Map|3=symbol_only=yes}} -> {{infoicon|World Map|symbol_only=yes}}
* {{t|infoicon|Iron Ore Crushed}} → {{infoicon|Iron Ore Crushed}}
* {{t|infoicon|World Map|3=link=yes}} -> {{infoicon|World Map|link=yes}}
* {{t|infoicon|PCB}} → {{infoicon|PCB}}
* {{t|infoicon|Worker}} -> {{infoicon|Worker}}
* {{t|infoicon|PCB|3=plural=yes}} {{infoicon|PCB|plural=s}}
* {{t|infoicon|Worker|3=plural=s}} -> {{infoicon|Worker|plural=s}}
* {{t|infoicon|PCB|3=link=yes|4=plural=s}} {{infoicon|PCB|plural=s|link=yes}}
* {{t|infoicon|Workers}} -> {{infoicon|Workers}}
* {{t|infoicon|PCB|3=symbol_only=yes}} → {{infoicon|PCB|symbol_only=yes}}
* {{t|infoicon|Unity}} -> {{infoicon|Unity}}
* {{t|infoicon|Worker}} {{infoicon|Worker}}
* {{t|infoicon|Unity Large}} -> {{infoicon|Unity Large}}
* {{t|infoicon|Worker|3=plural=s}} {{infoicon|Worker|plural=s}}
* {{t|infoicon|Workers}} {{infoicon|Workers}}
* {{t|infoicon|Unity}} {{infoicon|Unity}}
* {{t|infoicon|Unity Large}} {{infoicon|Unity Large}}
** This is an example of an image which is too large and busy to display properly as an infoicon (see [[:File:Unity Large.png]]).


<includeonly>[[Category:Formatting templates]]</includeonly><!--
<includeonly>[[Category:Formatting templates]]</includeonly><!--
--><noinclude>[[Category:Template documentation|{{PAGENAME}}]]</noinclude>
--><noinclude>[[Category:Template documentation|{{PAGENAME}}]]</noinclude>

Revision as of 23:54, 21 January 2022

Purpose
This template provides a method to rapidly include an icon and link inline with text, such as inside of a paragraph or in a bulleted list.
Automations
Automatically detects and corrects a handful of mismatches between image filenames and desired article names.
Usage
The template accepts up to three parameters:
{{{1}}} = image name
symbolonly = yes (optional)(rare)
link = yes (optional). Adds a text hyperlink to the article name. However, please do not overuse this.
plural = s (optional). Generally "s" or "es" as a plural suffix.
For irregular plural suffixes like "knife" → "knives", instead use symbolonly and manually provide the link.
Examples