Vorlage:Hatnote/doc: Unterschied zwischen den Versionen
move the redirects to a {{template shortcut}} invocation, add an example near the top, and make a slight copy edit
(add an example) |
(move the redirects to a {{template shortcut}} invocation, add an example near the top, and make a slight copy edit) |
||
Zeile 2: | Zeile 2: | ||
{{high-risk|819,000+}} | {{high-risk|819,000+}} | ||
{{shortcut|T:HAT}} | {{shortcut|T:HAT}} | ||
{{template shortcut|dablink|rellink}} | |||
{{lua|Module:Hatnote}} | {{lua|Module:Hatnote}} | ||
This template formats text into the standard stylistic for a [[Wikipedia:Hatnote|Wikipedia hatnote]]. It produces a short note placed at the top of an article to provide disambiguation of closely related terms or summarise a topic, explaining its boundaries. | This template formats text into the standard stylistic for a [[Wikipedia:Hatnote|Wikipedia hatnote]]. It produces a short note placed at the top of an article to provide disambiguation of closely related terms or summarise a topic, explaining its boundaries. Hatnotes look like this: | ||
{{hatnote|Example hatnote text.}} | |||
{{TOC limit}} | {{TOC limit}} | ||
Zeile 42: | Zeile 45: | ||
If you see this error message, it is for one of three reasons: | If you see this error message, it is for one of three reasons: | ||
# No parameters were specified (the template code was <code><nowiki>{{hatnote}}</nowiki></code>). Please use <code><nowiki>{{hatnote|</nowiki>''text''<nowiki>}}</nowiki></code> instead. | # No parameters were specified (the template code was <code><nowiki>{{hatnote}}</nowiki></code>). Please use <code><nowiki>{{hatnote|</nowiki>''text''<nowiki>}}</nowiki></code> instead. | ||
# Some parameters were specified, but the | # Some parameters were specified, but the hatnote text wasn't included. For example, the template text <code><nowiki>{{hatnote|extraclasses=seealso}}</nowiki></code> will produce this error. Please use (for example) <code><nowiki>{{hatnote|</nowiki>''text''<nowiki>|extraclasses=seealso}}</nowiki></code> instead. | ||
# The hatnote text was specified, but that text contains an equals sign ("="). The equals sign has a special meaning in template code, and because of this it cannot be used in template parameters that do not specify a parameter name. For example, the template code <code><nowiki>{{hatnote|2+2=4}}</nowiki></code> will produce this error. To work around this, you can specify the parameter name explictly by using <code>1=</code> before the hatnote text, like this: <code><nowiki>{{hatnote|1=2+2=4}}</nowiki></code>. | # The hatnote text was specified, but that text contains an equals sign ("="). The equals sign has a special meaning in template code, and because of this it cannot be used in template parameters that do not specify a parameter name. For example, the template code <code><nowiki>{{hatnote|2+2=4}}</nowiki></code> will produce this error. To work around this, you can specify the parameter name explictly by using <code>1=</code> before the hatnote text, like this: <code><nowiki>{{hatnote|1=2+2=4}}</nowiki></code>. | ||
Zeile 56: | Zeile 59: | ||
The code is produced by [[Module:Hatnote]]. | The code is produced by [[Module:Hatnote]]. | ||
{{Hatnote templates documentation}} | {{Hatnote templates documentation}} |