Template:Favilink: Difference between revisions
mNo edit summary |
Kernelmethod (talk | contribs) m (Add link to the style guide page.) |
||
(27 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
<includeonly | <includeonly>{{#invoke:Favilink| favilink |{{#if:{{{Page|}}}|{{{Page}}}|{{{1|}}} }}|{{{2|}}}}}</includeonly><noinclude> | ||
[[Category:Shorthand Templates]] | [[Category:Shorthand Templates]] | ||
!!Currently only for use for objects in the tables: ItemsTable, Food, Corpses, Characters. All possible items can be found here: [[Special:CargoTables/GeneralData]]. If an item is missing, please let [[User:Teamtoto]] know. | NOTE: this can also be invoked with [[Template:F]], which is fewer characters to type. !!Currently only for use for objects in the tables: ItemsTable, Food, Corpses, Characters, Locations. All possible items can be found here: [[Special:CargoTables/GeneralData]]. If an item is missing, please let [[User:Teamtoto]] know. | ||
==Usage== | ==Usage== | ||
Used similar to regular wikipage linking syntax. First argument takes name of the page and will pull the image from that item. | Used similar to regular wikipage linking syntax. First argument takes name of the page and will pull the image from that item. This is not case sensitive! | ||
< | <pre> | ||
{{favilink| | {{favilink|Stopsvalinn}} | ||
</ | </pre> | ||
{{favilink| | {{favilink|Stopsvalinn}} | ||
If you want to use the wiki's page name instead, see [[Template:Favilink page]]. For the ObjectBlueprint id (which IS case sensitive), use [[Template:Favilink id]]. See [[Style Guide#Colored Names]] for more information on when to use these different favilink types. | |||
You can | ==Optional Parameters== | ||
You can use the following values as the second argument: | |||
{| class="wikitable" | |||
! <code>plural</code> | |||
| pluralizes the item name while preserving the color formatting. | |||
< | <pre> | ||
{{favilink |antimatter cell|plural}} | |||
</pre> | |||
{{favilink |antimatter cell|plural}} | |||
|- | |||
! <code>possessive</code> | |||
| makes the item name possessive while preserving the color formatting. | |||
<pre> | |||
{{favilink | Q Girl | possessive}} | |||
</pre> | |||
{{favilink | Q Girl | possessive}} | |||
|- | |||
! style="white-space:nowrap;" | <code>displayname-tooltip-override</code> | |||
| makes the hover tooltip equal to the display name for items whose display name doesn't match their page name, such as <code>cybernetics credit wedge 1¢</code>. This is probably only needed in special locations where part of the favilink can get truncated, such as in the Character infobox's Inventory list. | |||
<pre> | |||
{{favilink | cybernetics credit wedge 1¢ | displayname-tooltip-override}} | |||
</pre> | |||
<div class="qud-inventory-item" style="font-family:'Open Sans';font-size:15.5px;">{{favilink | cybernetics credit wedge 1¢ | displayname-tooltip-override}}</div> | |||
<div style="margin:1.5em 0 0.5em 2em;color:grey;"> | |||
''Compare to tooltip when this parameter is not specified:'' | |||
<div class="qud-inventory-item" style="font-family:'Open Sans';font-size:15.5px;">{{favilink | cybernetics credit wedge 1¢}}</div> | |||
</div> | |||
|- | |||
! style="white-space:nowrap;" | <code>prefix:<prefix></code> | |||
| Prepends a prefix to the name, which can include qud text color styles. | |||
<pre> | |||
{{favilink | mental aggregator | prefix:&ylant&Ye&Wr&Yn&yed}} | |||
</pre> | |||
{{favilink | mental aggregator | prefix:&ylant&Ye&Wr&Yn&yed}} | |||
|- | |||
! style="white-space:nowrap;" | <code>suffix:<suffix></code> | |||
| Postpends a suffix to the name, which can include qud text color styles. | |||
<pre> | |||
{{favilink | plasma grenade | suffix:mk II}} | |||
</pre> | |||
{{favilink | plasma grenade | suffix:mk II}} | |||
|- | |||
! ''<any other value>'' | |||
| completely overrides the name shown in the favilink to whatever argument specified. | |||
<pre> | |||
{{favilink|torch|A &Rreally&y spicy meatball}} | {{favilink|torch|A &Rreally&y spicy meatball}} | ||
</ | </pre> | ||
{{favilink|torch|A &Rreally&y spicy meatball}} | {{favilink|torch|A &Rreally&y spicy meatball}} | ||
|- | |||
|} | |||
</noinclude> | </noinclude> |
Latest revision as of 17:21, 18 December 2023
NOTE: this can also be invoked with Template:F, which is fewer characters to type. !!Currently only for use for objects in the tables: ItemsTable, Food, Corpses, Characters, Locations. All possible items can be found here: Special:CargoTables/GeneralData. If an item is missing, please let User:Teamtoto know.
Usage
Used similar to regular wikipage linking syntax. First argument takes name of the page and will pull the image from that item. This is not case sensitive!
{{favilink|Stopsvalinn}}
Stopsvalinn If you want to use the wiki's page name instead, see Template:Favilink page. For the ObjectBlueprint id (which IS case sensitive), use Template:Favilink id. See Style Guide#Colored Names for more information on when to use these different favilink types.
Optional Parameters
You can use the following values as the second argument:
plural
|
pluralizes the item name while preserving the color formatting.
{{favilink |antimatter cell|plural}} |
---|---|
possessive
|
makes the item name possessive while preserving the color formatting.
{{favilink | Q Girl | possessive}} |
displayname-tooltip-override
|
makes the hover tooltip equal to the display name for items whose display name doesn't match their page name, such as cybernetics credit wedge 1¢ . This is probably only needed in special locations where part of the favilink can get truncated, such as in the Character infobox's Inventory list.
{{favilink | cybernetics credit wedge 1¢ | displayname-tooltip-override}} Compare to tooltip when this parameter is not specified: |
prefix:<prefix>
|
Prepends a prefix to the name, which can include qud text color styles.
{{favilink | mental aggregator | prefix:&ylant&Ye&Wr&Yn&yed}} |
suffix:<suffix>
|
Postpends a suffix to the name, which can include qud text color styles.
{{favilink | plasma grenade | suffix:mk II}} |
<any other value> | completely overrides the name shown in the favilink to whatever argument specified.
{{favilink|torch|A &Rreally&y spicy meatball}} |