Template:Selfref/doc: Difference between revisions

From Zoophilia Wiki
Jump to navigationJump to search
meta>Rich Farmbrough
No edit summary
Line 4: Line 4:
== Usage ==
== Usage ==


<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:Self-references to avoid]].
<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:Self-references to avoid]].


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:
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>
<pre>
{{selfref|the self-referential notice to display, including links}}
{{Selfref|the self-referential notice to display, including links}}
</pre>
</pre>
If the text of the notice contains any = characters, you have to escape it like this:
If the text of the notice contains any = characters, you have to escape it like this:
<pre>
<pre>
{{selfref|1=the self-referential notice to display, including links}}
{{Selfref|1=the self-referential notice to display, including links}}
</pre>
</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.
(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:
<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>
<pre>
{{selfref|the self-referential text to display without reformatting|}}
{{Selfref|the self-referential text to display without reformatting|}}
</pre>
</pre>
or adding the word "inline" after a bar, like this:
or adding the word "inline" after a bar, like this:
<pre>
<pre>
{{selfref|the self-referential text to display without reformatting|inline}}
{{Selfref|the self-referential text to display without reformatting|inline}}
</pre>
</pre>


Line 32: Line 32:
! Code !! Page on Wikipedia !! Page on some mirrors
! Code !! Page on Wikipedia !! Page on some mirrors
|-
|-
| <nowiki>{{selfref|For the Wikipedia Sandbox, see [[WP:SAND]]}}</nowiki><br><br><nowiki>The Wikipedia Sandbox is a page on Wikipedia. {{selfref|You can edit it by clicking "edit" on the page.|}} It has been edited many times.</nowiki>
| <nowiki>{{Selfref|For the Wikipedia Sandbox, see [[WP:SAND]]}}</nowiki><br><br><nowiki>The Wikipedia Sandbox is a page on Wikipedia. {{Selfref|You can edit it by clicking "edit" on the page.|}} It has been edited many times.</nowiki>
| {{selfref|For the Wikipedia Sandbox, see [[WP:SAND]]}}
| {{Selfref|For the Wikipedia Sandbox, see [[WP:SAND]]}}


The Wikipedia Sandbox is a page on Wikipedia. {{selfref|You can edit it by clicking "edit" on the page.|}} It has been edited many times.
The Wikipedia Sandbox is a page on Wikipedia. {{Selfref|You can edit it by clicking "edit" on the page.|}} It has been edited many times.
| The Wikipedia Sandbox is a page on Wikipedia. It has been edited many times.
| The Wikipedia Sandbox is a page on Wikipedia. It has been edited many times.
|}
|}

Revision as of 06:24, 30 June 2009

Usage

{{Selfref}} is a template that is used to mark pieces of text and links that wouldn't make sense on mirrors of Wikipedia: see Wikipedia:Self-references to avoid.

In most cases, {{Selfref}} 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 '{{Selfref|For Wikipedia's policy on avoiding bias, see [[Wikipedia:Neutral point of view]].}}'. When using {{Selfref}} in this way, use the following format:

{{Selfref|the self-referential notice to display, including links}}

If the text of the notice contains any = characters, you have to escape it like this:

{{Selfref|1=the self-referential notice to display, including links}}

(This is needed with all templates, not just {{Selfref}}.) When using {{Selfref}} in this way, the text will be indented slightly and put in italics.

{{Selfref}} can also be used for any other text which shouldn't appear in mirrors (the mirrors can remove it by blanking {{Selfref}} 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:

{{Selfref|the self-referential text to display without reformatting|}}

or adding the word "inline" after a bar, like this:

{{Selfref|the self-referential text to display without reformatting|inline}}

This template should not be substituted.

Example

Code Page on Wikipedia Page on some mirrors
{{Selfref|For the Wikipedia Sandbox, see [[WP:SAND]]}}

The Wikipedia Sandbox is a page on Wikipedia. {{Selfref|You can edit it by clicking "edit" on the page.|}} It has been edited many times.
The Wikipedia Sandbox is a page on Wikipedia. It has been edited many times.
The Wikipedia Sandbox is a page on Wikipedia. It has been edited many times.

See also

  • Wikipedia:Self-references to avoid
  • {{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).