Difference between revisions of "Template:Infoicon/doc"

From Captain of Industry Wiki
Jump to: navigation, search
(+ui param documentation)
(update for reversed link param behavior)
Line 9: Line 9:
::<code>{{{1}}}</code> = image name</code>
::<code>{{{1}}}</code> = image name</code>
::<code>symbolonly = yes</code> (optional)(rare)
::<code>symbolonly = yes</code> (optional)(rare)
::<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>link = no</code> (optional). Prevents hyperlinking the text in cases where you want the icon but are avoiding link [[Wikipedia:Manual of Style/Linking#Duplicate and repeat links|overuse]].
::<code>plural = s</code> (optional). Generally "s" or "es" as a plural suffix.
::<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.
:::For irregular plural suffixes like "knife" → "knives", instead use <code>symbolonly</code> and manually provide the link.
Line 20: Line 20:
* {{t|infoicon|PCB}} → {{infoicon|PCB}}
* {{t|infoicon|PCB}} → {{infoicon|PCB}}
* {{t|infoicon|PCB|3=plural=yes}} → {{infoicon|PCB|plural=s}}
* {{t|infoicon|PCB|3=plural=yes}} → {{infoicon|PCB|plural=s}}
* {{t|infoicon|PCB|3=link=yes|4=plural=s}} → {{infoicon|PCB|plural=s|link=yes}}
* {{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}}
* {{t|infoicon|Worker|3=ui=yes}} → {{infoicon|Worker|ui=yes}}
* {{t|infoicon|Worker|3=ui=yes}} → {{infoicon|Worker|ui=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 name
symbolonly = 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.
ui = yes (optional). Prevents the white glow which improves accessibility from being applied (useful for white UI elements)
Examples