Template:Selfref: Difference between revisions
Content added Content deleted
(add spaces around headings) |
m (81 revisions imported from templatewiki:Template:Selfref) |
||
(33 intermediate revisions by 21 users not shown) | |||
Line 1: | Line 1: | ||
{{#switch:{{{2|NONE}}} |
|||
{{ |
|NONE|hatnote|hat={{Hatnote|1=<span class="plainlinks selfreference noprint">{{{1}}}</span>}} |
||
|inline=<span class="plainlinks selfreference" style="font-style: italic;"><!--Same style as class hatnote.-->{{{1}}}</span> |
|||
|<!--Matching the empty string here for unprintworthy content is for backwards compatibility with the 2006-2008 version. Do not depend on it!-->=<span class="plainlinks selfreference noprint">{{{1}}}</span> |
|||
|#default={{error|Second parameter must be <code>hatnote</code>, <code>hat</code>, or <code>inline</code>}} |
|||
}}<noinclude> |
|||
{{Documentation}} |
|||
<!-- PLEASE ADD THIS TEMPLATE'S CATEGORIES THE /doc SUBPAGE, AND INTERWIKIS TO WIKIDATA, THANKS --> |
|||
== Usage == |
|||
{{En-WP attribution notice|Template:Selfref}} |
|||
<nowiki>{{selfref}}</nowiki> is a template that is used to mark pieces of text and links that wouldn't make sense on mirrors of Wikipedia: see [[Wikipedia:Avoid self-references]]. |
|||
In most cases, <nowiki>{{selfref}}</nowiki> is used to create a disambiguation link to a page in the Wikipedia: namespace from article space; for instance, [[Objectivity (journalism)]] has a selfref link '<nowiki>{{selfref|For Wikipedia's policy on avoiding bias, see [[Wikipedia:Neutral point of view]].}}</nowiki>'. When using <nowiki>{{selfref}}</nowiki> in this way, use the following format: |
|||
<pre> |
|||
{{selfref|the self-referential notice to display, including links}} |
|||
</pre> |
|||
If the text of the notice contains any = characters, you have to escape it like this: |
|||
<pre> |
|||
{{selfref|1=the self-referential notice to display, including links}} |
|||
</pre> |
|||
(This is needed with all templates, not just <nowiki>{{selfref}}</nowiki>.) When using <nowiki>{{selfref}}</nowiki> in this way, the text will be indented slightly and put in italics. |
|||
<nowiki>{{selfref}}</nowiki> can also be used for any other text which shouldn't appear in mirrors (the mirrors can remove it by blanking <nowiki>{{selfref}}</nowiki> in their copy, although not all of them do), without reformatting; to use it like this, place an extra vertical bar at the end of the template inclusion, like this: |
|||
<pre> |
|||
{{selfref|the self-referential text to display without reformatting|}} |
|||
</pre> |
|||
This template should not be [[WP:SUBST|substituted]]. |
|||
== See also == |
|||
*[[Wikipedia:Avoid self-references]] |
|||
*{{tl|srlink}}, for the opposite case when you want a link to the Wikipedia: namespace that ''does'' show in mirrors without breaking (for instance when writing an article about Wikipedia or something connected to it). |
|||
<!--Categories--> |
|||
[[Category:Section templates|{{PAGENAME}}]] |
|||
[[Category:Templates using ParserFunctions|{{PAGENAME}}]] |
|||
<!--Other languages--> |
|||
[[da:Skabelon:Selfref]] |
|||
[[fr:Modèle:Auto-référence]] |
|||
[[no:Mal:Selfref]] |
|||
</noinclude> |
</noinclude> |
Latest revision as of 16:55, 30 March 2021
<templatestyles src="Module:Documentation/styles.css"></templatestyles>
Template documentation[create]
This template uses material from the Wikipedia template Template:Selfref, which is released under the Creative Commons Attribution-ShareAlike 3.0 Unported License (view authors). |