You must log in to edit PetroWiki. Help with editing

Content of PetroWiki is intended for personal use only and to supplement, not replace, engineering judgment. SPE disclaims any and all liability for your use of such content. More information


Help:Links

PetroWiki
Revision as of 22:47, 20 September 2013 by Denise Watts (Denisewatts) (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

There are two primary types of links in PetroWiki:

  1. Internal links to other pages in the wiki
  2. External links to other websites

Internal links

The easiest way to create an internal link is to use the Vector toolbar insert internal link button.png link on the edit toolbar. Highlight the text you want to hyperlink, then adjust the top box for the name of the page to link to. As you type, you will see existing page names that may be the one you want that you can select. You can create a link to an existing page, or to a page that needs to be created. (Be sure you search for appropriate page names -- try using a second browser tab or window.)

Alternatively, to add an internal link, enclose the name of the page you want to link to in double square brackets. When you save the page, you'll see the new link pointing to your page. If the page exists already it is displayed in blue, if it does not, in red.

Selflinks to the current page are not transformed in URLs but displayed in bold. (If you really want to link to the current page, use an anchor (see below), or [[#top|current page]] which always links to the top.)

The first letter of the target page is automatically capitalized, unless otherwise set by the admins, and spaces are represented as underscores (typing an underscore in the link will have a similar effect as typing a space, but is not recommended, since the underscore will also be shown in the text).

Description You type You get
Internal link
[[Main Page]]
Main Page
Piped link
[[Main Page|different text]]
different text
Internal link to an anchor on the same page
[[#See also]]

Section headings and the top of the page are automatically anchored.

#See also
Internal link to an anchor that you reference with different text
[[#See also|different text]]
different text
Setting an internal link anchor so you'll be able to link to it
<div id="NameOfAnchorHere">optional text</div>

Omit the "optional text" for invisible anchor.

optional text
Internal link to an anchor on another page
[[Help:Images#Supported media types for images]]
Help:Images#Supported media types for images

External links

To add an external link, enclose the name of the page you want to link to in single square brackets. When you save the page, you'll see the new link pointing to your page, with an arrow icon after it to show that it was coded with single bracket external link syntax, and thus may lead to another site.

Description You type You get
External link http://www.petrowiki.org http://www.petrowiki.org
External link with different label [http://www.petrowiki.org PetroWiki] PetroWiki
Numbered external link [http://www.petrowiki.org] [1]
External links with file icons [http://en.wikipedia.org/wiki/.avi video] [http://en.wikipedia.org/wiki/.ogg sound] [http://en.wikipedia.org/wiki/.pdf document]

See #External link icons for currently supported icons and extensions.

video
sound
document

External link icons

Test link Icon Trigger
[2] external-link-ltr-icon.png .external, http://, gopher://
[3] lock-icon.png https://
[4] mail-icon.png mailto:
[5] news-icon.png news://
[6] file-icon.png ftp://
[7] talk-icon.png irc://
[8] audio-icon.png .ogg, .mid, .midi, .mp3, .wav, .wma
[9] video-icon.png .ogm, .avi, .mpeg, .mpg
[10] document-icon.png .pdf, .pdf#, .pdf?

How to avoid auto-links

When you put a URL on a wiki page it will be automatically converted into an external link, like this:

http://Petrowiki.org

To avoid that effect, put the URL between <nowiki> tags, like this:

<nowiki>http://Petrowiki.org</nowiki>

To get this:

http://Petrowiki.org