模板:No selflink
[[{{{1}}}]]
This template normally creates a link to a page, but omits the link brackets if it is the page itself. Such a self link would otherwise cause bold text.
This template can be used in another template which links to a page where it is transcluded. This template is not recommended in navigation templates where many readers will expect to see the bold text caused by self links.
使用方法
编辑- First parameter is the page name.
- Second parameter is optional to specify different link text.
示例
编辑{{No selflink|Wikipedia:Five pillars}}
will produce Wikipedia:Five pillars on any page except on Wikipedia:Five pillars itself where it would produce the unlinked and unbolded text "Wikipedia:Five pillars". (The code[[Wikipedia:Five pillars]]
would have produced the bold Wikipedia:Five pillars on that page).{{No selflink|Wikipedia:Five pillars|The five pillars}}
will produce a piped link displaying The five pillars on any page except on Wikipedia:Five pillars itself where it would produce the unlinked and unbolded text "The five pillars". (The code[[Wikipedia:Five pillars|The five pillars]]
would have produced the bold The five pillars on that page).
另见
编辑- {{Link if not current}} – produces a list item or nothing
- Help:Self link
上述文档嵌入自Template:No selflink/doc。 (编辑 | 历史) 编者可以在本模板的沙盒 (创建 | 镜像)和测试样例 (创建)页面进行实验。 请在/doc子页面中添加分类。本模板的子页面。 |