More actions
m →Code snippets: Add snippet |
m Add notes on linking (Unfinished) |
||
| Line 40: | Line 40: | ||
|<nowiki>{{hatnote|This article details the Level ?, <Faction> version of this mission. For other variants, see [[<Mission>|<Mission> (disambiguation)]].}} | |<nowiki>{{hatnote|This article details the Level ?, <Faction> version of this mission. For other variants, see [[<Mission>|<Mission> (disambiguation)]].}} | ||
</nowiki>}} | </nowiki>}} | ||
=== Linking === | |||
==== Wiki internal ==== | |||
'''Syntax:''' <code><nowiki>[[<Namespace>:<Page name>#<Anchor>|<Display>]]</nowiki></code> | |||
; Namespace : The namespace of the page, separated from the Page name by a colon(:). Default is the main namespace. Options: User, Template, etc. Namespace is NOT case sensitive. | |||
; Page name : The name of the page<ref name="main">In the main namespace called article</ref>. Page name is case sensitive with the exception of the first letter. | |||
; Anchor : To an ID somewhere inside a page. Anchor must be preceded by a #. Headings have an automatic ID identical to the header name. ID can be added manually by using {{T|Anchor}} or adding an <code>ID=</code> manually.ID's must be unique. Anchor's are case sensitive. | |||
; Display : The text that appears visible. Only needed when different from the linking part. Display is preceded by the pipe(|) symbol | |||
Internal wiki links check the existence of the target page. If the page doesn't exist, is misspelled or the case is incorrect the link turns [[redlink|red]]. | |||
'''Usage:''' | |||
; Page name only : Using the page name only links to a page<ref name="main" /> in the main namespace with display identical to page name:<br> | |||
<nowiki>[[Venture]]</nowiki> results in [[Venture]]<br> | |||
As the first letter is not case sensitive <nowiki>[[venture]]</nowiki> also results in a valid link [[venture]] | |||
; Link end "trick". : Putting text directly connecting to the closing ]] results in that text being added to the displayed text.<br> | |||
<nowiki>[[Venture]]s</nowiki> results in [[Venture]]s while the link still goes to Venture.<br> | |||
<nowiki>[[Venture]]abunchofletters</nowiki> results in [[Venture]]abunchofletters while the link still goes to Venture. | |||
; Namespace and Page name | |||
: To go to a page outside the main namespace the namespace needs to be added to the link | |||
<nowiki>[[User:Evon R'al]]</nowiki> gives [[User:Evon R'al]]<br> | |||
<nowiki>[[UniWiki:Manual of Style]]</nowiki> gives [[UniWiki:Manual of Style]] | |||
; Page name and Anchor : Using a Page name and an Anchor gets to a specific location within a page. | |||
: Using an Anchor only, leads to a specific location within the page. | |||
<nowiki>[[combat sites#Expeditions]]</nowiki> gives [[combat sites#Expeditions]]<br> | |||
The existence of the page is still checked, but the existence of the anchor is not.<br> | |||
Note: If a non existing anchor is used the link goes to the top of the page.<br> | |||
<nowiki>[[combat sites#no exist]]</nowiki> gives [[combat sites#no exist]], leading ot the top of the combat sites page | |||
<nowiki>[[#Signatures]]</nowiki> gives [[#Signatures]] leading to the Signatures heading on this page. | |||
; Page name and display | |||
<nowiki>[[Venture|Venture]]</nowiki> results in [[Venture|Venture]]. More then double the amount of typing for the same result as when using a page name only link and more cluttered reading in the source.<br> | |||
But when doing this: Example of an <nowiki>[[Venture|mining]]</nowiki> frigate, we get Example of a [[Venture|mining]] frigate. | |||
The use of display is particularly useful when namespaces or anchors are used. To increase readability.<br> | |||
<nowiki>[[User:Evon R'al|Evon R'al]]</nowiki>'s user page gives [[User:Evon R'al|Evon R'al]]'s user page<br> | |||
A link to <nowiki>[[combat sites#Expeditions|Expeditions]]</nowiki> gives A link to [[combat sites#Expeditions|Expeditions]]<br> | |||
===== Special cases ===== | |||
; File namespace | |||
<nowiki>[[File:Helpicon.png]]</nowiki> gives [[File:Helpicon.png]] the file embedded at the location of the link.<br> | |||
To get a link to the file page the namespace needs to be preceded by a colon (:)<br> | |||
<nowiki>[[:File:Helpicon.png]]</nowiki> gives [[:File:Helpicon.png]] a link to the file page.<br> | |||
<nowiki[[:File:Evon R'al.jpg]]</nowiki> gives [[:File:Evon R'al.jpg]]<br> | |||
Display can be used like <nowiki>[[:File:Evon R'al.jpg|Evon R'al]]</nowiki> to change the presentation: The file page of [[:File:Evon R'al.jpg|Evon R'al]]'s portrait.<br> | |||
For parameters to influence size and placement of a file see [[Mediawikiwiki:Help:Images]] | |||
; Media namespace : Is a virtual namespace which gives a direct link to a file. | |||
<nowiki>[[Media:Evon R'al.jpg]]</nowiki> gives [[Media:Evon R'al.jpg]]<br> | |||
Display can be used: <nowiki>[[Media:Evon R'al.jpg|portrait]]</nowiki> to get Evon R'al's [[Media:Evon R'al.jpg|portrait]]. | |||
; Category namespace | |||
<nowiki>[[Category:Pilots]]</nowiki> gives a link to the Category category and the pilots category in a separate box at the bottom of the page.<br> | |||
To get a link to the Pilots category in the text use <nowiki>[[:Category:Pilots]]</nowiki> which gives [[:Category:Pilots]] | |||
Further reading [[mediawikiwiki:Help:Links]] | |||
[https://wiki.eveuniversity.org/api.php?action=query&meta=siteinfo&siprop=namespaces&format=xml List of namespaces (In raw XML)] | |||
=== MessageBox with logo === | === MessageBox with logo === | ||
| Line 151: | Line 216: | ||
</nowiki> | </nowiki> | ||
</pre> | </pre> | ||
Results in: | |||
<div class="mw-collapsible" style="border: 2px solid white; padding: 0.5em;"> | <div class="mw-collapsible" style="border: 2px solid white; padding: 0.5em;"> | ||
Content of outer div. | Content of outer div. | ||