Template:Item icon/doc: Difference between revisions

Jump to navigation Jump to search
(add in-text example)
(Add troubleshooting)
Line 49: Line 49:
== Related templates ==
== Related templates ==
{{ItemIcon/Family}}
{{ItemIcon/Family}}
== Troubleshooting ==
=== Icon does not show up ===
* Check that the name is provided correctly.
: Refer to the template you are using. [[Template:ItemIcon]] requires the name to be provided as the <code>name=</code> parameter, while other templates might use anonymous parameters.
* Check that the page exists
: The page must exist and use [[Template:MiscItemPage]], [[Template:EquipmentPage]], [[Template:WeaponPage]], or [[Template:ItemIcon Insert]]. Technically, you could also insert directly into the <code>item_icon</code> Cargo table, but please don't do that without good reason.
* Check that the parameters are passed to the page-generating templates
: '''ItemIcon''' pulls from the page-generating template parameters, particularly <code>rarity</code>, <code>image</code>, and <code>icon</code>. Either <code>image</code> or <code>icon</code> needs to be set for an icon to show.
* Try doing a null edit on the page.
: The '''ItemIcon''' template was introduced after the page-generating templates. This means that information won't be inserted into the Cargo table until the pages that use the page-generating templates are edited. You can do a '''null edit''' to forcibly insert information into the table. This is an edit where you change nothing. It will not show up in the page's edit history or your contribution page, but it will refresh the page and, if applicable, insert the info needed into the table.
* Ask on Discord
: If none of the above steps work, ask on the Discord and someone might be able to help solve the problem.