Help:Self link

From The Final Challenge Wiki
Jump to navigation Jump to search

Template:H:h A self link is a link to the page itself. Since it is likely to be confusing to click on a link that leads back to the same page, a self link appears as non-clickable bold text (the "self-link format") when the article is viewed, instead of the normal wikilink format. Examples:

Purpose

By itself, it is not useful to create bold text this way. However, the feature can be useful if, after expansion of any templates etc., the same wikitext is used on multiple pages and, depending on the page, it should produce a working link or just bold text. This applies, in particular, in the case of links in a template that is called on the various target pages.

Clickable self links

Notwithstanding the description above, there are some self links to which the self-link format does not apply.

Self link with full URL

Providing an external link with the full URL of the same page on which the link appears will give a standard, clickable link. For example, if you are viewing the master copy on Meta of this help page ([1]), then this is demonstrated here:

  • [http://meta.wikimedia.org/wiki/Help:Self_link] gives [2]

Indirect self link

An indirect self link is a link to a page that redirects back. In this case, the self-link format does not apply, even though it would be equally useful here. If you are viewing the master copy on Meta of this help page, then this is demonstrated here:

To simulate a self link, make the target name for which this should apply an independently retrievable data item (e.g. in onlyinclude tags, as has been done with "Self link" on this page).

Thus, using Template:Link with self link simulation:

Self link with interwiki project prefix

Also, when the prefix for the project itself is added (interwiki link style, but again linking to the page itself) the self-link format does not apply; if you are viewing the master copy on Meta of this help page then this is demonstrated here:

Self link to a section

See Help:Link#Anchors for more information on this.

For a link to a section of the same article, even from the same section, the self-link format does not apply:

The [[#top]] link is a convenient way to link back to the top of a long page, without leaving the reader confused about the link's purpose.

See also

Template:H:f