用法
本模板適用於頂注和「參見」章節,或在同一篇文章中的「參考文獻」章節。當在文章正文中使用時,請考慮到公開連結到另一篇文章中的特定章節是否會讓那些無法點擊連結的讀者感到困惑,例如那些查看材料的印刷版或沒有連結的重新發布版本的讀者。
語法(概覽)
{{section link|条目|章节}}
或{{section link|条目#章节}}
,連結到另一個條目的章節 → 示例: 有獸焉 § 主要角色{{section link|条目|章节|nopage=y}}
,連結到另一個條目的章節,僅顯示章節的標題 → 示例:§ 主要角色{{section link||章节}}
,為了在同一頁面中使用,請將第一個參數留空 → 示例:§ 主要角色
單個章節
這個模板{{section link}},或者它的快捷方式{{slink}},用來生成指向到本地wiki頁面的某個章節的連結,並呈現一個適當的分節符號(§)。
除了
[[有兽焉#主要角色]]
取而代之的是:
{{section link|有兽焉|主要角色}}
或
{{section link|有兽焉#主要角色}}
多個章節
此模板可以生成指向同一頁面的多個章節的連續連結。您可以寫:
{{section link|有兽焉|四不像|兔爷|天禄}}
或
{{section link|有兽焉#四不像|兔爷|天禄}}
禁用頁面名稱
有時,為了避免冗餘和冗長,不需要出現頁面名稱。對於使用本模板的頁面,不指定頁面名稱只會創建章節連結。例如:
{{Section link||禁用頁面名稱}}
相當於:
[[#禁用頁面名稱|§ 禁用頁面名稱]]
顯示為
使用|nopage=y
可達到同樣的視覺效果。
顯示結果的比較:
{{section link|四不相|困兽岛}}
→ 四不相 § 困獸島{{section link|有兽焉|四不像|nopage=y}}
→ § 四不像{{section link|有兽焉|四不像|兔爷|天禄}}
→ 有獸焉 §§ 四不像、兔爺 和 天祿{{section link|有兽焉|四不像|兔爷|天禄|nopage=y}}
→ §§ 四不像、兔爺 和 天祿
模板數據
This template is used to generate a link to a certain section of a local wiki page and render an appropriate section mark (§). This template may generate consecutive links to several sections of the same page.
參數 | 描述 | 類型 | 狀態 | |
---|---|---|---|---|
Page name | 1 | Name of the page to which the link must be created. Leave empty to link to the current page. Doing so causes no page name to appear. | 頁面名稱 | 建議 |
Section name 1 | 2 | Name of the (first) section to which the link must be created. This parameter is mandatory. | 字串 | 必填 |
Section name 2 | 3 | This template can link to additional sections within one page. You can supply another section name in this field. | 字串 | 非必填 |
Section name 3 | 4 | This template can link to additional sections within one page. You can supply another section name in this field. | 字串 | 非必填 |
Section name 4 | 5 | This template can link to additional sections within one page. You can supply another section name in this field. | 字串 | 非必填 |
Hide page name | nopage | If set to "yes", "y" or "true", hides the page name (only section names are displayed). | 布林值 | 非必填 |
Keep underscores | keep-underscores | If set to "yes", "y" or "true", doesn't replace underscores with spaces in the page name and section names. | 布林值 | 非必填 |
Displayed page name | display | If the page name must be displayed differently (e.g. in italics), enter it here. | 字串 | 非必填 |