FANDOM


{{#vardefine:Name|Redirection}}{{M}} "{{#var:Name}}" not found
Template documentation (for the above template, sometimes hidden or invisible)
Description
This template will make a link to the Mod with a tooltip showing the mod. It will only accept the exact name of the mod.
Note: Some mod articles have "(Mod)" suffix which shouldn't be included. It'll give an error like in the example below.
Syntax
Type {{M|Mod|Custom Name}} as a replacement for mod link.
Input examples

{{M|Redirection}}

  • {{#vardefine:Name|Redirection}}{{M}} "{{#var:Name}}" not found

{{M|Reach|Melee Mod}}

  • {{#vardefine:Name|Reach}}{{M}} "{{#var:Name}}" not found

{{M|Stick of Truth}} Incorrect mod name gives an error.

  • ​{{#vardefine:Name|Stick of Truth}}{{M}} "{{#var:Name}}" not found

The example with Scorch mod. You should always use the mod's name without (Mod) suffix.

  • {{M|Scorch}} generates {{#vardefine:Name|Scorch}}{{M}} "{{#var:Name}}" not found
  • {{M|Scorch (Mod)}} generates {{#vardefine:Name|Scorch (Mod)}}{{M}} "{{#var:Name}}" not found
Technical stuff

The template checks if first argument matches the name of the mod in Module:Mods/data. This is to check if a mod with that name actually exists. Another possibility would've been to check if an article with that name exists but it's limited to 250 calls per article and is not ideal as it would break on Mods 2.0.

  • If the mod exists, class="mod-tooltip" data-param="{{#var:Name}}" tells javascript that this text wants a tooltip, which is made by {{Tooltip/Mod}}.
  • If the mod doesn't exist, the error is shown instead of a redlink along with Category:Mod Tooltip error added on that page.

If second argument is used -> Category:Mod Tooltip rename is added on the page as to list pages with second argument, as they are harder to edit automatically if there's a need for that. Note: commented out until needed


Visit Template:M/doc to edit this text! (How does this work?)
Community content is available under CC-BY-SA unless otherwise noted.