Template:Short description: Difference between revisions
Created page with "{{#ifeq:{{lc:{{{1|}}}}}|none|<nowiki /><!--Prevents whitespace issues when used with adjacent newlines-->|<div class="shortdescription nomobile noexcerpt noprint searchaux" style="display:none">{{{1|}}}{{SHORTDESC:{{{1|}}}|{{{2|}}}}}</div>}}<includeonly>{{#ifeq:{{{pagetype}}}|Disambiguation pages||{{#ifeq:{{pagetype |defaultns = all |user=exclude}}|exclude||{{#ifeq:{{#switch: {{NAMESPACENUMBER}} | 2 | 3 | 4 | 5 | 6 | 7 | 10 | 11 | 12 | 13 | 14 | 15 | 100 | 101 | 118 | 11..." |
No edit summary |
||
Line 1: | Line 1: | ||
<noinclude><!-- This template was intentionally left commented out as there is no consensus to use this there. Template only exists to prevent bad links on pages people copy from en.wiki --></noinclude><includeonly>[[Category:Pages with short description]]</includeonly><noinclude> | |||
{{Documentation}} | {{Documentation}} | ||
</noinclude> | </noinclude> |
Latest revision as of 02:25, 8 September 2024
Template:Documentation subpage
TemplateStyles' src
attribute must not be empty.
This template uses TemplateStyles: |
This template produces formatted text, following the guideline for a hatnote.
{{hatnote|Example hatnote text.}}
→
Broadly speaking, a hatnote should answer a readers' question (maybe preemptively): Am I on the right page?
Function[edit source]
This template is primarily used to add a correctly formatted hatnote to a page. Often, but not always, this is a disambiguation link at the top of article pages. It places an HTML div-
/ div
block around the text entered as its only argument, which provides standardized formatting (contents are indented and italicized in most displays); it also isolates the contained code to make sure that it is interpreted correctly.
This template is also used as the "meta-template" for additional specialized disambiguation link templates.
The template does not automatically create links of any kind. Links and other desired formatting must be explicitly added, using normal Wikipedia markup.
Usage[edit source]
Template:((hatnote|textTemplate:))
Parameters[edit source]
This template accepts the following parameters:
1
- the hatnote text (required)
Example[edit source]
{{hatnote|Example hatnote text}}
→Example hatnote text
Technical details[edit source]
The HTML code produced by this template looks like this:
[[:Template:^(]]div role="note" class="hatnote"[[:Template:)^]]
hatnote text[[:Template:^(]]/div[[:Template:)^]]
Template for creating a standard hatnote. A hatnote is a short note placed at the top of an article or section to direct users to related pages
Parameter | Description | Type | Status | |
---|---|---|---|---|
Text | 1 text | This field should contain the text that will be displayed in the hatnote.
| String | required |
Extra classes | extraclasses | Comma-separated list of CSS class names | String | optional |