Help:Links

From LifeWiki
Jump to: navigation, search

Creating links to other pages is a key part of creating a complete and well-formatted wiki page. A well-linked page permits readers to easily access other topics that they may be interested in learning more about, and encourages readers to continue to explore the site.

General information

Links are a vital part of the wiki, and are strongly encouraged on all pages in order to refer the reader to other relevant pages (and prevent unnecessary duplication). However, it is also possible to go overboard with links. In general, a link should only be added the first time a topic is mentioned on a page, rather than every time the topic is mentioned.

When creating links on a page, you may want to also check what links to that page. In general, if there is enough overlap for page A to link to page B, then page B should probably also have a link to page A. On the left side of any page, in the toolbox, you can use "What links here" to see which pages link to that page. This is one way to check whether a page is fully cross-linked. If you're creating a new page, this is the best way to make sure that people will be able to find your new page.

Link basics

The bare minimum necessary to create a wiki link is to put two square brackets on either side of a word. So to change "glider" into a link, just add brackets: [[glider]]. When you preview your edit, the word should now be displayed using blue text rather than black text. If, however, your link is in red text then you have tried to create a link to a page that does not exist. You should probably double check whether you have spelled the word correctly.

Creating internal links

Internal links are those created to other pages on the wiki; this is by far the most common type of link. Some examples are:

You Type You See
[[Glider]] Glider
[[Glider|This links to the glider page!]] This links to the glider page!
[[Non-existent page]] Non-existent page
[[Glider#Colour of a glider|Colour of a glider]] Colour of a glider
[[:Category:Patterns found by David Bell|David Bell]] David Bell's patterns
[[#Link basics|Link basics]] Link basics

An internal link always uses two square brackets. Within the brackets, the various parts of the link are:

  1. The name of the page that you would like the reader to jump to if they click on the link. This can be omitted if you are linking to somewhere else on the same page.
  2. An anchor, starting with #, if you would like the reader to jump to somewhere in the middle of the page. This can be omitted if you just want to link to the top of a page.
  3. A label, starting with a vertical bar |, if you would like to customize the text displayed for the label. This can be omitted if you want the text displayed to be the page name itself.

A link to an existing page will always be displayed using blue text. After creating a link, it is recommended to preview the page and double check that the link is indeed blue. If it is red, you have made a typographical error (unless you are intentionally trying to make a link to a page that needs to be created). Sometimes links can show up as black, meaning that the wiki isn't even treating it as a link: check that your link starts with [[ and ends with ]]; see also labels.

Anchors

The pound sign (#, shift+3 on US keyboards) is used if you would like to link to somewhere other than the top of a page. The HTML terminology for the spot you link to is an "anchor". This is very useful if you want to refer the reader directly to the most relevant part of the page, especially for long pages.

Any section title (header) on a page can automatically be used as an anchor. In other words you can use any text that is enclosed in equal signs (=) when you look at the page in the editor. On pages with table of contents, those section titles will all be shown in the table of contents; if you click on one of those entries, the URL including the anchor will be shown in your browser window.

Labels

Without a label, the text shown for your link will just be the page name, which in some cases is not the best choice. To create a label, you use the pipe sign (|, shift+\ on US keyboards, often shown as two vertical lines instead of just one). Any text entered after the pipe symbol is used as a custom label for the link (i.e., the text that will appear to the reader).

Special cases

There are a few types of links that have a special meaning.

  • Links created to image pages will by default insert that image, instead of creating a plain link. If you want to create a plain text link, insert a colon at the start of the link. For example, [[:Image:Glider.png]] creates Image:Glider.png.
  • Links created to categories will by default add the page to that category, and will not show any link at that spot in the text. If you want to create a link to a category page, insert a colon at the start of the link. For example, [[:Category:Oscillators]] creates Category:Oscillators.

Redirects

Redirects are a special type of internal link, and are used to make readers completely bypass that page and instead open a different page.

An example of a redirect page is Featherweight spaceship; if you follow this link you will instead pull up the glider page. A message at the top of the page lets you know that you were "Redirected from featherweight spaceship". If you really want to see the "Featherweight spaceship" page, you can click on the link in the "Redirected" message.

To turn a page into a redirect you would replace the entire page contents with a single line like:
#REDIRECT [[Glider]] The only other text that can be included on the page are category links.

There is no reason to add a label to the link, since readers will never see it. The link should include an anchor if the redirect should take the readers somewhere other than the top of the page. For example, the redirect page Colour of a glider contains the redirect link [[Glider#Colour of a glider]] so that readers who follow the link end up at the most relevant part of the glider page, instead of just ending up at the top of the page.

Most redirect pages are created automatically. Every time a page is moved, the original page name is turned into a redirect to the new page name. This ensures that any existing links to the page were not broken by the page move. The "What links here" feature (lower left corner of any page) can be used to identify internal links; correcting those links to point to the new page is highly recommended. If you wish to get rid of the original page completely, a proposed deletion can be used to request that an administrator delete the page. Before doing so, be sure to fix all internal links to the original page. However, in cases where there are external links to the original page, the deletion request may be denied.

Creating external links

External links are links made to sites other than LifeWiki. There is a different syntax for external links than internal links. Also, external links have an additional arrow added to the displayed link; this is done to warn readers that following the link will take them to a different site.

You Type You See
http://www.en.wikipedia.org http://www.en.wikipedia.org
[http://www.en.wikipedia.org] [1]
[http://www.en.wikipedia.org Wikipedia] Wikipedia

External links