Links

Jump to: navigation, search

Editor-In-Chief: C. Michael Gibson, M.S., M.D. [1]

Overview

The words in blue in WikiDoc are hyperlinks, and they allow users to move between pages.

There are two general types of hyperlinks in WikiDoc:

  1. Internal Links to other pages in WikiDoc: These are also called a wikilink or an internal link
  2. External Links to pages outside of WikiDoc

Internal Links to other pages in WikiDoc:

These are also called a wikilink or an internal link

You can create a link to a page within WikiDoc by enclosing the word inside tow square brackets like this:

Typing this:

[[ST Elevation Myocardial Infarction]]

Yields this:

ST Elevation Myocardial Infarction

What if I want alternate text to appear instead of the text that leads to the page I am linking to?

For example, if you want to use the word heart attack in a page instead of ST Elevation Myocardial Infarction, but you want the text of heart attack to go to ST Elevation Myocardial Infarction?

In this case you use what is called a "piped link" because it uses the symbol |.

Typing this:

[[ST Elevation Myocardial Infarction|heart attack]]

Yields this:

heart attack

The word heart attack appears, but you end up at ST Elevation Myocardial Infarction.

External Links to pages outside of WikiDoc

External links link directly to any webpage outside of WikiDoc.

What is the Syntax to Make an External Link?

For instance, say you want to link to a website named www.exmaple.org.

Typing this:

[http://www.example.org link name]

Yields this:

link name

CAUTION: To make this work, you need to separate the name "link name" from the text that precedes it with a space.

What happens if I don't specify a "link name"?

Links without link names will be numbered.

Typing this:

[http://www.example.org]

Yields this:

[2].

What happens if I don't use the square brackets?

Links with no square brackets will be displayed in their entirety:

Typing this:

http://www.example.org

Yields this:

http://www.example.org

Unlike in the case of an internal link, [http://www.example.org a] gives a.

How Do I Get Rid of That Arrow Icon?

Monobook skin produces an arrow icon after every external link. This can be suppressed with class="plainlinks":

Typing this the usual way:

http://a

Yields this the usual way with an arrow:

http://a

However, typing this:

<span class="plainlinks">http://a</span>

Yields this without the arrow:

http://a

Why Are Some Links Black Instead of Blue?

WikiDoc automatically checks to see if the target of a wikilink exists. If the page doesn't exist, the link is black and the link leads to the editing screen so that the page can be created/edited.

What if the Page it Links to is Small and What is the "Stub Feature"

A wikilink to an existing page will be called a 'stub' if the page is not a redirect, and the number of bytes of the wikitext is less than the "threshold for stub display" set in the user's preferences.

This allows users to immediately identify links to very short pages th`at probably need to be expanded. Alternately, a user may set a very high threshold.

What if I want to Link Directly to a Section or Subsection of a Page Rather than to the top of the Page? What is "Section linking (anchors)"

You type the following to go to a section named "conclusion" in a page named "page name" and call it "in the conclusion"

[[page name#conclusion|in the conclusion]]

Links in the form [[#anchor_name]] will link to any anchor named "anchor_name" on the page. This may be either a heading named "anchor_name", or an arbitrary position. [[#top]] is a reserved name that links to the top of a page. It is possible to create an arbitrary anchor name using the HTML code <span id="anchor_name"></span>.

Anchor links can also be appended to any type of link; for more information, see Help:Section#Section_linking.

Here is an example:

Typing this:

[[Cervix#Cervical mucus|cervical mucus]]

Yields this:

cervical mucus

Miscellaneous

Linking to a page with images

It is possible to use images as links to other pages. For more information, see use an image as a link to a page.

"Hover box" on links

On some browsers, holding the cursor over link will show a hover box containing the text of the link's HTML title attribute. MediaWiki sets this to the target page name (without the possible section indication) if it's a wikilink, the page name with prefix if it's an interwiki link, and the URL if it's an external link.

This can be switched off in the user preferences. The browser may also show similar info, but with the possible section indication, in the address bar.

For these effects a piped link is useful even if it not followed; for example, for displaying the meaning of an acronym (e.g. NPOV) or any other remark. It is possible to produce a hover box without a link, see m:Template:H:title (talk, backlinks, edit).

Disallowed characters

In internal and interwiki link style, a plus sign in a page name is not allowed, the HTML and hence the rendered page just shows the wikitext, e.g. a+b. In external link style a plus sign in the URL is retained. It is often equivalent with a space. See also below.

In accordance with the rules explained in Help:Page name, conversions are automatically made to non-literal characters in wiki and interwiki links. For example, "[[Help:Page%20name]]" becomes "Help:Page name". However, the opposite is true for external links; literal characters are converted into non-literal characters. For example, most browsers will convert ".../wiki/!" to ".../wiki/%21".

A code like %70 in a redirect disables it, although the link works from the redirect page. For a redirect that works, the redirect page shows the canonical form of the target, unlike its preview page, which renders the link in the usual way.

Special pipe syntax

Using an empty pipe syntax on wiki and interwiki links will hide interwiki prefixes and parentheses. For example, [[w:Mercury (planet)|]] becomes Mercury. This pipe syntax should only be used where the unqualified reference is not ambiguous, such as in an article about the solar system. See Help:Piped link.

Additional effects of links

  • Related changes
  • Backlinks
  • Date format
  • Using a space after the pipe syntax ([[Main page| ]]) produces (perhaps depending on the browser) a space only, not a link (" "), but it is treated as a link for the "what links here" feature.

Links from a page

With query the links from page pagename, sorted by namespace, and for each namespace alphabetically, are given by {{SERVER}}{{SCRIPTPATH}}/query.php?what=links&titles=pagename , e.g. https://www.wikidoc.org/query.php?what=links&titles=Links .

See also


Linked-in.jpg