Difference between revisions of "Template:Infoicon/doc"
From Captain of Industry Wiki
Thadius856 (talk | contribs) (+plural param, clarification, improve examples) |
Thadius856 (talk | contribs) (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) | ::<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}} | * {{t|infoicon}} → {{infoicon}} | ||
* {{t|infoicon| | * {{t|infoicon|Corn}} → {{infoicon|Corn}} | ||
* {{t|infoicon| | * {{t|infoicon|Iron Ore Crushed}} → {{infoicon|Iron Ore Crushed}} | ||
* {{t|infoicon| | * {{t|infoicon|PCB}} → {{infoicon|PCB}} | ||
* {{t|infoicon|Worker}} | * {{t|infoicon|PCB|3=plural=yes}} → {{infoicon|PCB|plural=s}} | ||
* {{t|infoicon|Worker|3=plural=s}} | * {{t|infoicon|PCB|3=link=yes|4=plural=s}} → {{infoicon|PCB|plural=s|link=yes}} | ||
* {{t|infoicon|Workers}} | * {{t|infoicon|PCB|3=symbol_only=yes}} → {{infoicon|PCB|symbol_only=yes}} | ||
* {{t|infoicon|Unity}} | * {{t|infoicon|Worker}} → {{infoicon|Worker}} | ||
* {{t|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 namesymbolonly = 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.
- For irregular plural suffixes like "knife" → "knives", instead use
- Examples
- {{infoicon}} → Infoicon: parameter {{{1}}} was not provided
- {{infoicon|Corn}} → Corn
- {{infoicon|Iron Ore Crushed}} → Iron Ore Crushed
- {{infoicon|PCB}} → PCB
- {{infoicon|PCB|plural=yes}} → PCBs
- {{infoicon|PCB|link=yes|plural=s}} → PCBs
- {{infoicon|PCB|symbol_only=yes}} → PCB
- {{infoicon|Worker}} → Worker
- {{infoicon|Worker|plural=s}} → Workers
- {{infoicon|Workers}} → Workers
- {{infoicon|Unity}} → Unity
- {{infoicon|Unity Large}} → 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).