Difference between revisions of "Template:Infoicon/doc"
From Captain of Industry Wiki
Thadius856 (talk | contribs) (update for reversed link param behavior) |
Thadius856 (talk | contribs) m (typo) |
||
Line 19: | Line 19: | ||
* {{t|infoicon|Iron Ore Crushed}} → {{infoicon|Iron Ore Crushed}} | * {{t|infoicon|Iron Ore Crushed}} → {{infoicon|Iron Ore Crushed}} | ||
* {{t|infoicon|PCB}} → {{infoicon|PCB}} | * {{t|infoicon|PCB}} → {{infoicon|PCB}} | ||
* {{t|infoicon|PCB|3=plural= | * {{t|infoicon|PCB|3=plural=s}} → {{infoicon|PCB|plural=s}} | ||
* {{t|infoicon|PCB|3=link=no|4=plural=s}} → {{infoicon|PCB|plural=s|link=no}} | * {{t|infoicon|PCB|3=link=no|4=plural=s}} → {{infoicon|PCB|plural=s|link=no}} | ||
* {{t|infoicon|PCB|3=symbol_only=yes}} → {{infoicon|PCB|symbol_only=yes}} | * {{t|infoicon|PCB|3=symbol_only=yes}} → {{infoicon|PCB|symbol_only=yes}} |
Revision as of 05:37, 22 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 the following parameters:
{{{1}}}
= image namesymbolonly = yes
(optional)(rare)link = no
(optional). Prevents hyperlinking the text in cases where you want the icon but are avoiding link overuse.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
ui = yes
(optional). Prevents the white glow which improves accessibility from being applied (useful for white UI elements)
- Examples
- {{infoicon}} → Infoicon: parameter {{{1}}} was not provided
- {{infoicon|Corn}} → Corn
- {{infoicon|Iron Ore Crushed}} → Iron Ore Crushed
- {{infoicon|PCB}} → PCB
- {{infoicon|PCB|plural=s}} → PCBs
- {{infoicon|PCB|link=no|plural=s}} → PCBs
- {{infoicon|PCB|symbol_only=yes}} → PCB
- {{infoicon|Worker|ui=yes}} → Worker
- {{infoicon|Worker|plural=s|ui=yes}} → Workers
- {{infoicon|Workers|ui=yes}} → Workers
- {{infoicon|Unity|ui=yes}} → Unity
- {{infoicon|Unity Large|ui=yes}} → 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).