Linking
From Lost Minis Wiki
This Linking page is one of the Editing the Wiki guides. This guide deals with adding links, both internal and external, to the wiki markup. If you are new to wiki software then this page might help you but mostly this is gone into in far too much detail and people learn best by copying existing code and experimenting.
Note: you can always test code out on any page by editing it and using the "Show preview" option instead of the "Save page" option. Alternatively, your username is a link that takes you to you user-page (initially blank) and you can edit your user-page as much as you like.
Links in General
There are two main kinds of link: External Links to other websites and Internal Links to pages on this wiki. Pages on this wiki include Articles, Categories & Image pages. You might also want to link to a different part of the page that you are on or on a target page (i.e. not just the top of the page) - these are jump links (or anchor links). Various examples of these are shown below.
Note: links to commercial sites (that are not figure manufacturers) or to online auctions can be seen as a form of advertising (spamming). This if not encouraged and links might be removed and in particularly gratuitous cases abusers will be banned.
External Link
http://en.wikipedia.org/wiki/Main_Page
Looks like: http://en.wikipedia.org/wiki/Main_Page
This type is ugly but shows exactly where it points to and the protocol in use (http or https).
Footnote External Link
[http://en.wikipedia.org/wiki/Main_Page]
Looks like: [1]
Try not to use this type - the auto-generated number will change if you add other links before it.
Renamed External Link
[http://en.wikipedia.org/wiki/Main_Page Wikipedia Main Page]
Looks like: Wikipedia Main Page
This type uses a "space" then replacement text after the link. It is necessary to use this type when passing a link into a Template because templates object to the "elink" template (below).
Wikipedia Link
[[wikipedia:Main_Page|Wikipedia Main Page]]
Looks like: Wikipedia Main Page
This type usea a "space" then replacement text after the link. It is preferred for Wikipedia linking as it is more compact.
Plain External Link
{{elink|http://en.wikipedia.org/wiki/Main_Page}}
Looks like: http://en.wikipedia.org/wiki/Main_Page
The elink template is used and unlike the External Link above does not have the icon after the link indicating the link protocol.
Footnote Plain External Link
{{elink|http://en.wikipedia.org/wiki/Main_Page|}}
Looks like: [2]
The elink template can be used with a pipe character after the link but without replacement text which causes an auto-number to be generated.
Renamed Plain External Link
{{elink|http://en.wikipedia.org/wiki/Main_Page|Wikipedia Main Page}}
Looks like: Wikipedia Main Page
The elink template can be used with a pipe character and replacement text to stop the link itself being used as the text.
Internal Link
[[Julie Guthrie]]
Looks like: Julie Guthrie
This links to an Article page on the wiki.
Renamed Internal Link
[[Julie Guthrie|J. Guthrie]]
Looks like: J. Guthrie
Same as Internal Link but changes the displayed text to the text after the '|' (pipe) character.
Top & Footer Internal Link
[[#top|Back to Top]] or [[#footer|Back to Bottom]]
Looks like: Back to Top
Looks like: Back to Bottom
A bit specialized, but if you have an overly long page you might want to use these. This is also an example of a jump link (see below).
Image Page Internal Link
[[:Image:RP-01-001v1.jpg|Alt Views]]
Looks like: Alt Views
It is possible to display images inline on a page but you might also want to just provide a text link to a particular image instead of showing the image directly.
Internal Page Jump Link
[[#Links in General|Links in General]]
Looks like: Links in General
Jump-linking refers to linking within the same Article page using anchor targets. To use them you have to set up the anchors. Fortunately, using headings on a page automatically creates an associated anchor. For example, the "Links in General" section heading above has created one. Note: case-sensitive.
Jump Link to an Anchor
[[#AnchorName]] [[#AnchorName|YourText]]
Looks like: #AnchorName or YourText
This jumps within the page to an anchor hidden above at the end of the "Links In General" heading.
Making an Anchor
<div id="AnchorName2"></div> <div id="AnchorName2">Some Text</div> <span id="AnchorName2">Some Text</div>
Looks like: Some Text.
This anchor can now be targeted as in the "Jump Link to an Anchor" section. Or for example: #AnchorName2.
Jump Link to Another Page
[[Main Page#Other Topics]] [[Main_Page#Other_Topics]]
Looks like: Main Page#Other Topics
This links back to the Main Page and the Other Topics section which has been give an "id" of "Other Topics" as in the "Making an Anchor" section. Notice, also, that "_" underscores can be substituted for spaces in links. Generally URLs don't want spaces in them.
Links With Equal Signs In
{{elink|1=http://www.miniatures-workshop.com/lostminiswiki/index.php?title=Main_Page}}
Looks like: http://www.miniatures-workshop.com/lostminiswiki/index.php?title=Main_Page
Notice how the underlying link has "title=Main_Page" in? That equals sign is problematic as elink is a Template and templates treat equal signs as special characters. That is why the link has "|1=" at the start. The "1=" tells the template that what follows up to the next "|" or the end "}}" is literally the value to use for template parameter 1. i.e. without interpreting the equal sign as a special character. Without the "1=" it would look like this: [{{{1}}} {{{1}}}]. And you can hide the ugliness of the link by adding "|2=Main Page" at the end like so: Main Page
Category Linking
{{clink|Grenadier}} {{clink|Grenadier|Renamed Text}}
Looks like: Grenadier and Renamed Text
If you have to link to a category page then this is how to do it. The "clink" template was added to the wiki as a shorthand for
[[:Category:Grenadier]]
Note the colon at the start - without it that would add the page it is on to that category as in the next example.
Adding a Page to a Category
[[Category:YourCategoryOne]] [[Category:'C' Series|C]]
If you want to add a page to a category then you put something like the above on the page anywhere but usually at the bottom because when you do this the wiki adds a special category footer to the page with links to all the categories that the page is included in. For example, this page is in the "QuickCode" category and you can scroll down to see the footer and link at the bottom of the page.
Redirects
#REDIRECT [[NewPageName]] #REDIRECT [[category:ProperCategoryName]]
The above two examples redirect a page to another page or category. Why would we want to do this? Mostly it happens automatically when we move pages: the original page still exists and the wiki software adds a redirect to the new page - this means any link elsewhere on the wiki or bookmarks in a user's browser or hyperlinks on other websites that point to the original page will still work.
References & Footnotes
This version of the wiki software is pretty old and does not have a lot of sophistication. In particular it lacks a proper reference and footnote system. Above we mentioned that you can leave footnote links like this: [3] - but this creates an automatically generated number where the number changes if you or someone else adds another similar link above it. This is not behavior that we would want as there may be links to footnote "3" elsewhere on the page and the number there is not automatically updated. And even though we've called it a "footnote" it is not really a footnote it is just a link that looks like a footnote. To simulate a working, proper footnote system on many pages you will find a "References" section at the bottom and in this section we put the actual links (using elink) with a hard-coded number at the end. Then further up the page we put an internal page link to the "References" section. This looks like this (but there is no "References" section on this page):
{{elink|1=http://www.miniatures-workshop.com/lostminiswiki/index.php?title=Main_Page|2=[9]}} and elsewhere on the page we mention something [[#References|[9]]] and include the reference to it.
Looks like: [9] and elsewhere on the page we mention something [9] and include the reference to it.
Note the use of html encoding for left and right square brackets: "[" and "]" - square brackets are also a problem for templates so we have to work around it using html. There is also some CSS code behind the scenes making that reference into supertext.