Internal Links
|
Previous Top Next |
For external links see: External links
An assistant to convert a selected text to an internal link.
|
All wikitext markup languages have a simple way of hyperlinking to other pages within
the site, but there are several different syntax conventions for these links. Many wikis,
especially the earlier ones, used CamelCase to mark words that should be
automatically linked. In MediaWiki, this convention was replaced with the [[…]]
notation, which Wikipedia calls "free links".
In Wikipedia and some other wikis, free links are used in wikitext markup to produce
internal links between pages, as opposed to the concept of CamelCase for the same
purpose, which was used in the early days of Wikipedia.
In Wikipedia's markup language, you create free links by putting double square
brackets around text designating the title of the page you want to link to. Thus,
[[Texas]] will be rendered as Texas. Optionally, you can use a vertical bar (|) to
customize the link title. For example, typing [[Texas|Lone Star State]] will produce Lone
Star State, a link that is displayed as "Lone Star State" but in fact links to Texas.
Link to other wiki article
· Internally, the first letter of the target page is automatically capitalized and spaces
are represented as underscores (typing an underscore in the link has the same
effect as typing a space, but is not recommended).
· Thus the link hereafter is to the Web address
en.wikipedia.org/wiki/Public_transport, which is the Wikipedia article with the name
"Public transport". See also Canonicalization.
· A red link is a page that doesn't exist yet; it can be created by clicking on the link.
· A link to its own page will appear only as bold text.
London has [[public transport]].
Renders as:
· Same target, different name.
· The target ("piped") text must be placed first, then the text to be displayed
second.
New York also has [[public transport|public transportation]].
Renders as
New York also has public transportation.
· Automatically hide stuff in parentheses:
[[kingdom (biology)|]] >>> kingdom
· Automatically hide the comma and following text
[[Seattle, Washington|]] >>> Seattle
· Automatically hide namespace
[[Wikipedia:Manual of Style (headings)|]] >>> Manual of Style
[[Wikipedia:Manual of Style#Links|]] [[Wikipedia:Manual of Style#Links|]]
Blend link
· Endings are blended into the link.
· Exception: a trailing apostrophe (') and any characters following the apostrophe are
not blended.
· Preferred style is to use this instead of a piped link, if possible.
· Blending can be suppressed by using the <nowiki /> tag, which may be
desirable in some instances.
San Francisco also has public transportation. Examples include buses,
taxicabs, and trams.
Blending suppressed
· The part after the hash sign (#) must match a section heading on the page.
Matches must be exact in terms of spelling, case, and punctuation. Links to non-
existent sections are not broken; they are treated as links to the beginning of the
page.
· Include "| link title" to create a stylish (piped) link title.
· If sections have the same title, add a number to link to any but the first.
#Example section 3 goes to the third section named "Example section". You can
use the pipe
and retype the section title to display the text without the # symbol.
Wikipedia:Manual of Style#Italics is a link to a section within another page.
#Links and URLs is a link to another section on the current page. Links and URLs is a
link to the same section without showing the # symbol.
Italics is a piped link to a section within another page.
Interwiki link
Interwiki links are links to any page on other wikis. Interwikimedia links link to other
Wikimedia wikis. Note that interwikimedia links use the internal link style, with double
square brackets.
|
Project
|
Long form
|
shortcut
|
Wikipedia
Wiktionary
Wikinews
Wikibooks
Wikiquote
Wikisource
Wikispecies
Wikiversity
Wikivoyage
Wikidata
|
[[wikipedia:]]
[[wiktionary:]]
[[wikinews:]]
[[wikibooks:]]
[[wikiquote:]]
[[wikisource:]]
[[wikispecies:]]
[[wikiversity:]]
[[wikivoyage:]]
[[wikidata:]]
|
[[w:]]
[[wikt:]]
[[n:]]
[[b:]]
[[q:]]
[[s:]]
[[species:]]
[[v:]]
[[voy:]]
[[d:]]
|
Example
The long form doesn't work within the same project. The shortcut works everywhere.
(That is the intention; currently, it does not work on all projects.)
The interwiki map on Meta lists many prefixes, among others, [[wikipedia:]]
([[wikipedia:]]) for the English Wikipedia, working from any wiki supporting the Meta
interwiki map, not only from MediaWiki wikis. Some prefixes work only with a page, for
example: wikipediawikipedia: (fails) vs. wikipediawikipedia:Interwikimedia link (works).
These prefixes are case insensitive.
Non-Wikimedia interwiki codes have a limitation, that they can only be used through a
link. For example, the entry for "John" on Wiktionary, a Wikimedia project, can be
accessed by [[wikt:John]] or http://meta.wikimedia.org/wiki/wikt:John. However, the
latter method does not work for non-Wikimedia wikis. For example, the main page on
the Mozilla Wiki can be accessed via [[MozillaWiki:Main Page]], but
http://meta.wikimedia.org/wiki/MozillaWiki:Main_Page results in an error. In these
cases, Special:Search can be used
(http://meta.wikimedia.org/wiki/Special:Search/MozillaWiki:Main_Page). You can see
the Interwiki special page for a list of "forward" and "non-forward" prefixes.
In Interwiki linking, in the case of linking to another Wiki project, but in a different
language, this may be done by first putting the project link target, then a colon
followed by the target language as a prefix to the article page name, in the form:
For example, to link from en.Wikipedia to a Chinese language text at Wikisource
(zh.wikisource):
Type: [[wikisource:zh:天問|天問]] To get: 天問
Type: [[wikisource:zh:天問|Heavenly Questions]] To get: Heavenly Questions
These 3 examples all resolve to the zh.wikisource page 天問, but without the
misleading and distracting appearance of being an external link.
Interlanguage links
Interlanguage links are links from a page in one Wikipedia language to an equivalent
page in another language. These links can appear in two places:
· In the "Languages" list – a sidebar that appears on the left side (default
position) of the current page.
· Inline, in the text of a page ("local" links).
Wikidata is a separate project to create a collaboratively edited knowledge base. Part
of this project is to centralize the interlanguage links for all the Wikipedia projects. The
Wikidata entry for a page contains (among other things) a list of links for that entry in
different languages. This list of links is then used for the list shown on the page in
Wikipedia.
At the bottom of the Wikidata language list is a link labelled 'Edit links'. Clicking on this
will reveal two text boxes, one for the language and another for the article title. In the
first box type in the language code, for example, for Irish use the code "ga". In the
second box, type the name of the article as it appears in that language's Wikipedia.
Then click save. You can get directly to the Wikidata entry for a page by clicking the
link labelled 'Data item' in the Toolbox section of the sidebar. The link does not appear
on pages that haven't been linked to an item.
To edit an entry on Wikidata, click on the edit link next to the entry you wish to edit. A
textbox will appear allowing you to edit the entry. Click on save when you are done.
You can remove a page from the list of Wikidata's links. To do so click edit, then click
on the remove link.
If the scope of the two items is not in fact the same (typically, the article in one
language is wider in scope than the article in the other language) and then they
should not be linked. Unfortunately, there is no mechanism in Wikidata at present for
linking articles that are related, but different in scope; it is possible to do it with local
links.
Local links
The local links do however still serve some purposes:
· They override the information that comes from Wikidata.
· They are required if more than one article (or redirect) in one language should
point to a target article in another language.
· They are required in order to explicitly link to or from redirects. This can be
used to level semantical or organizational differences between articles in
different Wikipedias so that the links can go to the exact equivalent term in
another language rather than to an article with a somewhat different scope or
only related topic.
· They are required in order to link to sections of articles. For example,
corresponding to the English article Spot welding, in Italian there is only a
section rather than a full article, so Spot welding includes the local link
[[it:Saldatura#Saldatura a punti]].
· They are required for pages that are not allowed on Wikidata, such as
your userpage.
[[language code:Title]]
It is recommended interlanguage links be placed at the very end of the article.
Interlanguage links are not visible within the formatted article, but instead appear as
language links on the sidebar (to the left) under the menu section "languages".
Link from English article "Plankton" to the Spanish article "Plancton": [[es:Plancton]]
|
NOTE: These links are treated specially, and don't show up in the body of the text, but in a special sidebar section "Languages" listed by language name. They can go anywhere in the article source as their placement does not alter the visual appearance of the links on the rendered page except for the order. However, the convention is to put them at the bottom of the page. Remember, you only need these type links if you are overriding the information from Wikidata, otherwise you should edit the links on the Wikidata entry.