Content deleted Content added
→Examples: change order |
remove rellink, update hatnote, and update makeWikitextError |
||
Line 18:
<source lang="lua">
mHatnote._hatnote(s, options)
</source>
Formats the string <var>s</var> as a hatnote. This encloses <var>s</var> in the tags {{tag|div|params=class="
* <var>options.extraclasses</var> - a string of extra classes to provide
* <var>options.selfref</var> - if this is not nil or false, adds the class "selfref", used to denote self-references to Wikipedia (see [[Template:Selfref]]))
The CSS of the rellink class is defined in [[MediaWiki:Common.css]].
; Example 1
<source lang="lua">
Line 34 ⟶ 37:
Displays as:
{{hatnote|This is a hatnote.}}
; Example 2
<source lang="lua">
mHatnote._rellink('This is a
</source>
Produces:
{{tag|div|content=This is a
Displayed as:
{{
=== Format link ===
Line 114 ⟶ 97:
<source lang="lua">
mHatnote._makeWikitextError(msg, demo)
</source>
Formats the string <var>msg</var> as a red wikitext error message. Normally this function also adds [[:Category:Hatnote templates with errors]]; however, if <var>demo</var> is true then the category is suppressed.
Example:
|