Help:Linking

From Valve Developer Community
Jump to: navigation, search
English (en)Esperanto (eo)
Edit
Edit-copy.png
This is a help page
That means that this article contains information intended to advise or aid on the functions of the wiki, on how to use the wiki, or on general recommendations for users of the wiki.

Links (sometimes called hyperlinks) are all over the web. You probably followed one to find this page.

Tip.pngTip:You normally only need to link a term the first time it is mentioned in an article, but if the separate mentions are far apart you might want to link it more than once. Furthermore, consider your audience; you probably don't need to link to Source on a page about programming.

Creating Links

To add a link to another wiki page, type [[, then the page name, then ]], for example:

[[Main Page]]Main Page
[[Help Talk:Contents]]Help Talk:Contents


If you want a different display text, add a | between the page name and the ]], and then write what you want the text to be.

[[Help Talk:Contents|The discussion page]]The discussion page


If you only want to get rid of the namespace in the displayed text (everything before the first colon), then you can use the pipe trick by specifying an empty display text. It can also be used to remove a parenthesized part of the link title.

[[Help Talk:Contents|]]Contents
[[Bounce (level design)]]Bounce (level design)
[[Bounce (level design)|]]Bounce


To link to a Category page, you must add a colon at the beginning, otherwise you add the page to that category and nothing will be displayed.

[[:Category:Level Design]]Category:Level Design
[[:Category:Level Design|]]Level Design

Useful Templates

The template we call {{ent}} is convenient for when you want to make text both a link and code at once.

{{ent|info_player_start}}info_player_start
{{ent|sv_cheats|1}}sv_cheats 1


The templates {{tl}} and {{tl2}} are convenient to link to a template.

[[Template:ent]]Template:ent
[[Template:ent|]]ent
{{tl|ent}}{{ent}}
{{tl2|ent}}{{ent}}


If you want to link to a specific game, there is most likely a template for it, such as {{hl2}} for Half-Life 2. See Help:Templates#Per-game Templates for more variants. For short, it is also pretty common to use just the icon as a link. See Game icons for a list of game icon templates.

{{hl2}}Half-Life 2
{{hl2|1}}Half-Life 2
{{hl2|4}}Half-Life 2 Half-Life 2

External links

To link to a page on the English Wikipedia, add Wikipedia: to the page name or just w: for short. For the Wikipedia of a different language, insert the appropriate abreviation between these two like in the 4th example below. There are other websites you can link to as well, see here for a full list.

[[Wikipedia:Half-Life 2|Half-Life 2 on Wikipedia]]Half-Life 2 on Wikipedia
[[w:Half-Life 2|Half-Life 2 on Wikipedia]]Half-Life 2 on Wikipedia
[[w:Half-Life 2|]]Half-Life 2
[[w:de:Half-Life 2|]]Half-Life 2 (German)


To link to somewhere outside of the wiki, type [, then the URL, followed by a space, the text you want to describe the link, and then ]. You can also just directly paste in a URL, but it doesn't look as nice.

[https://www.google.com/ External link to Google]External link to Google
https://www.google.com/https://www.google.com/


A URL pointing to an image will display that image on a page. It won't have the best formatting however. Exercise caution when doing this and note that images from another website may change or disappear at any time.

Red Links

If you link to a page of this site that does not exist, the link text will turn red. This does not apply to Wikipedia or External links.

It's O.K. to link to a non-existent page! We would prefer that you then created that page, if you know about it. What we don't want is a page that's just "todo: make this page".

If you've created a page and pre-existing links to it still show as red, add ?action=purge to the end of the URLs to update their link colors. You can also do this by pressing the Edit button on the pages and saving them without changing anything.

Link Colors

Type of Link Before Visiting After Visiting
Wiki pages and External links #8BB9E0 #002BB8
Inter-wiki links #36B #551A8B
Broken links #D64B4B #BA0000

Links that link to their own pages (excluding ones redirecting to other sections) will appear to be bold.

See also