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://nanog.cluepon.net/index.php/". The following is an example for linking to the Wiki's main page, the URL of which is "http://nanog.cluepon.net/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:People|]]for example, will turn out like: People.
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, Tier 1 provider should take you to corresponding section on The NANOG Mailing List 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, Etc
Lets say you want to link to the "Category:People" page. You can't simply put "[[Category:People]]" onto a page. That will place that page in the "People" category. This is an easy matter to get around. Simply add a ":" add the begining of the link, like so:
- The above produces:
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.