FANDOM


This page is best viewed on Community Central. It necessarily uses links which are only available on that wiki.

Since source mode is significantly different than linking in either of Fandom's visual editors, it's useful to talk about linking through wikitext or linking in source mode separately. It's important to remember that many of the things below can only be done in source mode.

Internal links

An internal link is a link to any other page on the same wiki that you are currently editing. Attempting to create a link to the current page will fail. Instead, you'll just get bolded text.

Below we show a link to another page on this wiki:

[[Assume good faith]] = Assume good faith

and a link to the page we are on:

[[Help:Links/Wikitext]] = Help:Links/Wikitext


Displaying a link

The most basic kind of link is two [[square brackets]] around the name of a page on the wiki.

If you wish, you can change the displayed text by using a pipe, the vertical line found on most English keyboards above the Enter key (|). Generally, the pipe delineates between the proper name of the article on the left, and the how you want to display that link on the right.

[[Editing 101 | Editing]] = Editing


Common link types

Now that we know what a wikitext link is, let's look at the variety of ways in which it can be achieved.

What you type What happens
[[Color]] Color
[[Color]]s Colors (note how the s automatically becomes a part of the link)
''[[Sci-Fi|science fiction]]'' science fiction (you can apply formatting to the whole link)
[[Sci-Fi|'''science''' fiction]] science fiction (or you can emphasise only a part of the link)
[[This article doesn't exist]] This article doesn't exist (red links mean the article doesn't exist)
[[:file:wiki-wordmark.png]] file:wiki-wordmark.png (creates a link to the file, rather than putting the file on the page)
[[:category:browse]] category:browse (creates a link to the category, rather than putting the page into the category)

External links

External links can be roughly broken up into two types: those that can be created purely with wikitext and those that are generated through URLs.

Wikitext external links

Links to a page that's not on your wiki can be achieved by either using the "w:c: method" or by knowing the domain name of wikis that are in your wiki's interwiki map.

The w:c: method

Every wiki on Fandom can link to every other wiki by simply typing:

[[w:c:domain:article name]]
so
 

w:c:dc:Hawkgirl
w:c:007:M
w:c:warframe:Ash

… and so on. Note that any valid domain for the wiki will work, so w:c:007:M is just as valid as w:c:jamesbond:M.

Be careful that you link to a page that exists. A "w:c: link" always appears blue, even if there is no article of that name on that wiki. For instance, w:c:batman:Walt Disney World is a false blue link. When performing a "w:c: link", you should always click on it afterwards to make sure you're going to the intended page.

You can use a pipe to change the display text for a "w:c: link" just as you do for an on-wiki link.

Wikis in your interwiki map

If an external wiki is in your interwiki map, you can link to a page there by simply using [[domain:article name]].

By far, the most common wiki that uses this method is Wikipedia. Links there are achieved simply by typing wikipedia:Dolley Madison. Another popular external wikis is mediawiki.org, which houses a ton of help pages our readers enjoy. Links there are as easy as mw:Help:Parser functions


Using URLs

Although it's possible to create an internal link with a URL, you shouldn't. It's easier just to create a wiki-text link, and it makes wiki maintenance much easier if everyone is making internal links the same way.

When you need to link to a site that's not connected to Fandom, though, you have little choice but to make a URL link.

Here are some ways you can do that.

You type You see You link to
[http://www.example.org][1]http://www.example.org
[http://www.example.org Displayed text]Displayed texthttp://www.example.org
http://www.example.orghttp://www.example.orghttp://www.example.org
[http://www.example.org a]ahttp://www.example.org

Pipe tricks

A pipe trick uses a pipe to automatically transform the way a link is displayed. On saving a pipe-tricked link, the software actually changes the way the link is made.

Its most basic form is to chop off a namespace from the front of a page name.

Imagine you're trying to create a link to Community Central:Admins and mods, but you don't want to show the words Community Central. Just add a single pipe at the end, and the software will do its thing.

[[Community Central:Admins and mods|]] = Admins and mods

When you go back to edit the text, you'll find that the pipe trick has resulted in the full form, [[Community Central:Admins and mods|Admins and mods]].

Here are some other examples:

What you type What happens
[[Forum:Background (color2)|]] Background (the namespace gets lopped off, but also the parenthetical)
''[[wikipedia:Life on Mars (TV series)|]]'' Life on Mars (The call to wikipedia and the parenthetical get lopped off, but then the remainder gets made, properly, italic.)
[[Community Central:Community Development Team/Requests|]] Community Development Team/Requests (the namespace gets lopped off, but not the subpage)
[[:file:wiki-wordmark.png|]] wiki-wordmark.png (gets rid of the namespace, but not the .png file extension)
[[Forum:Background colors/pictures, HTML|]] Background colors/pictures (removes the namespace and everything after the comma)
[[w:c:parksandrecreation:Leslie Knope|]] c:parksandrecreation:Leslie Knope (pipe trick fails, but link is still valid)


Slash tricks

A slash trick is related to the pipe trick, but it helps you quickly link to subpages from the main page. For instance, this page, Help:Links/Wikitext is a subpage of Help:Links. If you were on Help:Links, you could link here by typing:

[[/Wikitext]] = /Wikitext

If you wanted to get rid of the slash at the beginning, then you could type:

[[/Wikitext/]] = Wikitext

Since we're here at Help:Links/Wikitext, the use of a slash trick would refer to the subpages of this subpage:


Link suggestions

Linksuggest

Link suggestions

When editing in source mode, a link suggestion feature will suggest the names of existing pages and files based on what you type. This is helpful if you cannot remember a precise name to create a link.

When you start typing a "[[" or "{{" and then some text, a pop-up will suggest items. So, for example, if you type "[[File:S" or "{{s" and then some text, it will suggest existing files or templates on your wiki that start with the letter S.

You can dismiss the link suggestions box by pressing the "Esc" key, and you can disable it entirely from the Editing tab of Special:Preferences by checking the "Do not show link suggest in Source mode" option.

Advanced linking

Linking to a category or image

When linking to a category for demonstrative purposes rather than for categorizing a page, or if you want to link to an image file page without the actual image showing, put a colon after the double opening square brackets, like this: [[:Category:Browse]] which will look like this: Category:Browse, and [[:File:Wiki-wordmark.png]] will look like this: File:Wiki-wordmark.png.

Linking to a page section

If you want to link to a section of a page, make sure the page section is marked by a header. Then, at the end of your regular link, put a hash (#) followed by the section name. For example write [[Help:Infoboxes#Custom_theming]] to generate: Help:Infoboxes#Custom_theming. If you want to get link to section on currently viewing page, you can skip page name and start with hash symbol followed by section name, for example [[#Linking_to_a_page_section]] which will produce: #Linking_to_a_page_section that links to this section. Clicking that kind of links wouldn't reload the page.

Linking from an image

If you want to link to a page from an image, add a parameter to the image which says link=Page name. So, for example, [[File:Wiki-wordmark.png|thumb|center|Click the image|link=Help:Contents]] makes:

Wiki-wordmark

Click the image

Changing the color of an individual link

If you want to change the color of one individual link (as opposed to every link on that wiki), you will need to use span tags and CSS on the pipe side of your link.

Using source mode, this means that if you were to, for example, make a link to Help:Contents green, you would write [[Help:Contents|<span style="color: green;">Help:Contents</span>]] which will look like: Help:Contents.

See also

Further help and feedback

Community content is available under CC-BY-SA unless otherwise noted.