From Ask Dr Wiki
There are two basic kinds of links in a wiki. Internal links, and External links. Both kinds are very straight forward.
An internal link can be added by using the third button from left. Clicking this button will automatically add "[[Link title]]" to the page. Replace "Link Title" With the name of the page you wish to link to. To determine the exact text you need to link to, find out the page's URL, and remove "http://wiki.urbandead.com/index.php/". The following is an example for linking to the Wiki's main page, the URL of which is "http://wiki.urbandead.com/index.php/Main_Page":
- The above produces this: Main_Page
- With the exception of the first letter, links are case sensitive. Also, all spaces are converted to underscores. For example,
[[Main_Page]], [[main_Page]], [[Main Page]], and [[main Page]]
all link to the main page, but
does not (uppercase "A" causes an error).
Now that the basics are covered, adding text to a link is simple. Simply add a "|" and the text you wish to be displayed, like so:
[[Main_Page|This is a link]]
- The above produces this: This is a link. These are called Piped Links.
Another trick involving internal links is that they automatically include any text touching them, without modifying the actual link. For example:
- The above produces this: Main Pageness
To rapidly create a piped link that doesn't display the namespace, simply add the pipe at the end – the wiki will automatically fill in the rest for you. For example, say I wanted to link to Special:Disambiguation, but didn't wan't Special: to show up, I would simply type the following:
- The above produces this: Disambiguation. Note that only text after the final ":" will be be displayed.
[[:Category:Suburbs|]]for example, will turn out like: Suburbs.
To link to a heading on the same page, you simply prefix the heading with a "#". For example, if you wanted to link to the heading "Redirects" you would type:
- The above produces this: #Redirects
You can also link to a heading on another page. Create a link to the page in question, add a "#" then the heading you wish to link to. For exampe, if you wanted to link to the heading Boldness and Italics on the page Help:Basic Formatting, you would need to type:
[[Help:Basic Formatting#Boldness and Italics]]
- The above produces this: Help:Basic Formatting#Boldness and Italics
While you can still create piped links to a heading, but something important to note is that the shortcut to remove extraneous text, like
(suburb name) and
:, with piped links like this one —
[[Help:Basic Formatting#Boldness and Italics|]] or
[[#Redirects|]] — will not work.
- [[Help:Basic Formatting#Boldness and Italics|]]
Also noteworthy is that redirects do not work properly with "#". It will be discarded when following the redirect. For example, First Aid Kit should take you to corresponding section on Useful Items page, but will actually direct you to the top of that page. You can see the wiki code of that particular redirect here.
An external link can be added by using the fourth button from left. Clicking this button will automatically add "[http://www.example.com link title]" to the page. Replace "http://www.example.com" With the URL you wish to link to, and, if you like, "Title" with the text you wish to be displayed. Or, if you perfer, remove "Title" altogether. This will produce a bracketed number, each one being higher than the last (,,, et cetra). These will automatically update if new links are added. Also, pasting a URL directly onto a page, without the brackets, will automatically provide an unformatted link. Examples:
[http://en.wikipedia.org/wiki/Main_Page Wikipedia] [http://en.wikipedia.org/wiki/Main_Page] http://en.wikipedia.org/wiki/Main_Page
Linking to Categories, Images, Etc
Lets say you want to link to the "Category:Users" or "Image:Img_upld.gif" pages. You can't simply put "[[Category:User]]" or "[[Image:Img_upld.gif]]" onto a page. The former will place that page in the "User" category, and the second will display the "Img_upld.gif" image. This is an easy matter to get around. Simply add a ":" add the begining of the link, like so:
Redirects are very straight-forward. Anytime you want to redirect a user who visits one page to another (Main_page is an example), simply apply the following code to the page.
- For an example of what a page looks like with this added, Click Here
- More information on redirects can be found Here.