Content deleted Content added
→Make wikitext error: update |
→Make wikitext error: add helpLink parameter and add another example |
||
Line 97:
<source lang="lua">
mHatnote.makeWikitextError(msg, helpLink, addTrackingCategory)
</source>
Formats the string <var>msg</var> as a red wikitext error message, with optional link to a help page <var>helpLink</var>. Normally this function also adds [[:Category:Hatnote templates with errors]]; however, if <var>addTrackingCategory</var> is not false after being passed through [[Module:Yesno]], then the category is suppressed. This means that the category can be suppressed with <var>addTrackingCategory</var> values including "no", "n", 0, "false", and {{code|false|lua}}.
Examples:
:{{code|mHatnote.makeWikitextError('an error has occurred')|lua}} → <strong class="error">Error: an error has occurred.</strong>
:{{code|mHatnote.makeWikitextError('an error has occurred', 'Template:Example#Errors')|lua}} → <strong class="error">Error: an error has occurred ([[Template:Example#Errors|help]]).</strong>
== Examples ==
|