Template:Hatnote/doc: Difference between revisions
Jump to navigation
Jump to search
Content added Content deleted
(Created page with "<includeonly>{{#invoke:Hatnote|hatnote}}</includeonly><noinclude>{{/doc}}</noinclude>") |
No edit summary |
||
Line 1: | Line 1: | ||
{{documentation}} |
|||
<includeonly>{{#invoke:Hatnote|hatnote}}</includeonly><noinclude>{{/doc}}</noinclude> |
|||
The '''hatnote''' template produces formatted text for the purpose of redirecting the reader to another page if needed. |
|||
It adds the <kbd>hatnote</kbd> class which indents and italicises the text and the <kbd>navigation-not-searchable</kbd> class which excludes the content from search snippets in [[Special:Search]]. |
|||
Generally the template should not be used directly on articles, instead one of the following templates can be used: |
|||
* {{T|Otheruses}} |
|||
* {{T|Redirect}} |
|||
* {{T|Redirect2}} |
|||
* {{T|Redirect3}} |
|||
* {{T|Main}} |
|||
* {{T|See also}} |
|||
* {{T|Confuse}} |
|||
* {{T|Flatpacked version}} |
|||
* {{T|Otheruse armour set}} |
|||
==Usage== |
|||
{{t|Hatnote|<nowiki>Further reading: [[Stone of Jas]]</nowiki>}} |
|||
would produce the following: |
|||
{{Hatnote|Further reading: [[Stone of Jas]]}} |
|||
{{TemplateData|<templatedata> |
|||
{ |
|||
"params": { |
|||
"1": { |
|||
"label": "Text", |
|||
"description": "Text that will be displayed in the hatnote.", |
|||
"type": "string", |
|||
"required": true |
|||
}, |
|||
"extraclasses": { |
|||
"label": "Extra classes", |
|||
"description": "Extra classes to be added to the <div> tags surrounding the hatnote text.", |
|||
"type": "line" |
|||
} |
|||
}, |
|||
"description": "Template that produces formatted text for the purpose of redirecting the reader to another page if needed." |
|||
} |
|||
</templatedata>}} |
|||
<includeonly>[[Category:Formatting templates|{{PAGENAME}}]][[Category:Transclusion templates|{{PAGENAME}}]]</includeonly> |
Latest revision as of 17:25, 15 October 2024
Template:Hatnote invokes function hatnote in Module:Hatnote using Lua.
The hatnote template produces formatted text for the purpose of redirecting the reader to another page if needed.
It adds the hatnote class which indents and italicises the text and the navigation-not-searchable class which excludes the content from search snippets in Special:Search.
Generally the template should not be used directly on articles, instead one of the following templates can be used:
{{Otheruses}}
{{Redirect}}
{{Redirect2}}
{{Redirect3}}
{{Main}}
{{See also}}
{{Confuse}}
{{Flatpacked version}}
{{Otheruse armour set}}
Usage
{{Hatnote|Further reading: [[Stone of Jas]]}}
would produce the following:
Template data
Show/hide template's data |
---|