跳转到内容

模板:Hatnote:修订间差异

来自天灾之下:危险连接资料站
bwiki>396634032
无编辑摘要
 
wiki>Waddie96
add noborder
第1行: 第1行:
<includeonly><div class="dablink" style="padding-bottom: 0.5em; margin-bottom: 0.5em;">{{{1}}}</div></includeonly><noinclude>
<templatestyles src="Hatnote/styles.css"/><div role="note" class="hatnote {{{extraclasses|{{{class|}}}}}}{{#if:{{{noborder|}}}|hatnote.noborder}}">{{{1|{{{text}}}}}}</div><noinclude>
{{documentation}}[[分类:格式模板]]
{{documentation}}
 
<!-- 在文档页放置分类/语言链接 -->
</noinclude>
</noinclude>

2025年9月4日 (四) 11:11的版本

{{{text}}}
模板文档

This template produces formatted text, following the guideline for a hatnote.

{{hatnote|Example hatnote text.}} →
Example hatnote text.

Broadly speaking, a hatnote should answer a readers' question (maybe preemptively): Am I on the right page?

Function

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

{{hatnote|text}}

Parameters

This template accepts the following parameters:

  • 1 - the hatnote text (required)

Example

  • {{hatnote|Example hatnote text}} →
    Example hatnote text

Technical details

The HTML code produced by this template looks like this:

  • <div role="note" class="hatnote">hatnote text</div>


Hatnote

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.

模板参数[编辑模板数据]

此模板首选参数不换行的行内格式。

参数描述类型状态
Text1 text

This field should contain the text that will be displayed in the hatnote.

示例值
Insert text here.
字符串必需
Extra classesextraclasses

Comma-separated list of CSS class names.

字符串可选