Help:Advanced Linking

From FamilySearch Wiki

(Difference between revisions)
(moved content from Help:Links)
Line 20: Line 20:
 
''Tip:'' To enter the pipe symbol (|), hold the "Shift" key down and then press the \ (the shift and the backslash keys).  
 
''Tip:'' To enter the pipe symbol (|), hold the "Shift" key down and then press the \ (the shift and the backslash keys).  
  
'''Example:'''  
+
'''Examples:'''  
 +
{| border="1" class="wikitable"
 +
|-
 +
! Description
 +
! You type
 +
! You get
 +
|-
 +
| Internal link
 +
| <pre>[[Main Page]]</pre>
 +
| [[Main Page]]
 +
|-
 +
| Piped link
 +
| <pre>[[Main Page|different text]]</pre>
 +
| [[Main Page|different text]]
 +
|-
 +
| Shortened sort-of-piped link
 +
| <pre>[[Internationalisation]]s</pre>
 +
| [[Internationalisation]]s
 +
|-
 +
| Redirect
 +
| <pre>#REDIRECT [[Main Page]]</pre>
 +
See also [[Help:Redirects]]
  
:<nowiki>[[African American Resources|African American Research]]</nowiki>
+
| → [[Main Page]]
 +
|-
 +
| Internal link to an anchor
 +
| <pre>[[#See also]]</pre>  
 +
[[Help:Formatting|Section headings]] and the [[#top|top]] of the page are automatically anchored.
  
The text above will appear as: [[African American Resources|African American Research]] even thought the actual title of the article is "African American Resources."
+
| [[#See_also]]
 +
|-
 +
| Internal link to an anchor at another page
 +
| <pre>[[Help:Images#See also]]</pre>
 +
| [[Help:Images#See_also]]
 +
|-
 +
| Internal link to the current page's talk page
 +
| <pre>[[{{TALKPAGENAME}}|Discussion]]</pre>
 +
See also [[Help:Magic words#Page_names]]
 +
 
 +
| [[{{TALKPAGENAME}}|Discussion]]
 +
|-
 +
| Internal link to a subpage
 +
| <pre>[[/example]]</pre>
 +
Shortcut for <nowiki>[[Help:Links/example]]</nowiki>. See also [[Help:Subpages]].
 +
 
 +
| [[/example]]
 +
|-
 +
| Internal link to a category page
 +
| <pre>[[:Category:Help]]</pre>
 +
See also [[Help:Categories]]
 +
 
 +
| [[:Category:Help]]
 +
|-
 +
| Internal link to an image or a file of other types
 +
| <pre>[[media:example.jpg]]
 +
 
 +
[[media:example.pdf]]</pre>
 +
See also [[Help:Images]]
 +
 
 +
| [[Media:Example.jpg]]
 +
[[Media:Example.pdf]]
 +
|}
  
 
=== How to create an external link using Wikitext  ===
 
=== How to create an external link using Wikitext  ===
Line 36: Line 93:
 
#Next type&nbsp;a single, left-facing&nbsp;square bracket ''']''' without leaving a space between the bracket and the last letter&nbsp;or symbol of the url&nbsp;or text.
 
#Next type&nbsp;a single, left-facing&nbsp;square bracket ''']''' without leaving a space between the bracket and the last letter&nbsp;or symbol of the url&nbsp;or text.
  
'''Example:'''  
+
'''Examples:'''  
 +
 
 +
{| border="1" class="wikitable"
 +
|-
 +
! style="width: 15%" | Description
 +
! style="width: 45%" | You type
 +
! style="width: 40%" | You get
 +
|-
 +
| External link
 +
| <pre>http://mediawiki.org</pre>
 +
| http://mediawiki.org
 +
|-
 +
| External link with different label
 +
| <pre>[http://mediawiki.org MediaWiki]</pre>
 +
| [http://mediawiki.org MediaWiki]
 +
|-
 +
| External link numbered
 +
| <pre>[http://mediawiki.org]</pre>
 +
| [http://mediawiki.org]
 +
|-
 +
| External link icons
 +
| <pre>[http://en.wikipedia.org/wiki/.avi video]
 +
[http://en.wikipedia.org/wiki/.wav sound]
 +
[http://en.wikipedia.org/wiki/.pdf document]
 +
</pre>
 +
External link icons may differ depending on the file type of the target.
  
:<nowiki>[http://www.familysearch.org FamilySearch]</nowiki>
+
|
 +
[http://en.wikipedia.org/wiki/.avi video] [http://en.wikipedia.org/wiki/.wav sound] [http://en.wikipedia.org/wiki/.pdf document]
  
The text above will appear as:[http://www.familysearch.org FamilySearch] even though the actual website url is "http://www.familysearch.org."
+
|-
 +
| External link to the same host
 +
| <pre>[http://{{SERVERNAME}}/pagename]</pre>
 +
| [http://{{SERVERNAME}}/pagename]
 +
|-
 +
| External link to other host passing the pagename
 +
| <pre>[http://google.com/search?q={{PAGENAMEE}}]</pre>
 +
| [http://google.com/search?q={{PAGENAMEE}}]
 +
|-
 +
| Mailto link
 +
| <pre>[mailto:info@example.org email me]</pre>
 +
| [mailto:info@example.org email me]
 +
|-
 +
| Mailto named with subject line and body
 +
| <pre>[mailto:info@example.org?Subject=URL%20Encoded%20Subject&amp;body=Body%20Text info]</pre>
 +
| [mailto:info@example.org?Subject=URL%20Encoded%20Subject&body=Body%20Text info]
 +
|}
  
 
== Other links  ==
 
== Other links  ==

Revision as of 23:33, 1 September 2012

Help-content.png This help article will guide you as you edit in the Wiki. See Contributor Help for more help articles.


Contents


Quick Reference:

  • Internal Link: On the page where you want the link to appear, type: [[pagetitle|visibletext]] where "pagetitle" = the name of the article you want to link to, and "visibletext" = the text users see on the page and will click on to be directed to the linked article.
  • External Link: On the page where you want the link to appear, type: [http://hyperlink visibletext] where "http://hyperlink" = the url of the website you want to link to (including http://), and "visibletext" the text users see on the page and will click on to be directed to the other website or url.

Linking with Wikitext

How to create an internal link using Wikitext

To create internal links using the "Rich Editor", see Create an internal link.

  1. Type double square brackets [[.
  2. Type the name of the article you want to link to immediately after the two square brackets, without leaving a space between the brackets. This is the actual article you will link to. If you want the text on the page to show the actual article title, skip to step 4. If you want the text on the page to read differently from the actual article title, continue with step 3.
  3. After typing the exact name of the article you are linking to, type the pipe symbol |, and then type the text that you want to appear as the link on the page.
  4. Next type double square brackets ]] without leaving a space between the bracket and the last letter of the title or text.

Tip: To enter the pipe symbol (|), hold the "Shift" key down and then press the \ (the shift and the backslash keys).

Examples:

Description You type You get
Internal link
[[Main Page]]
Main Page
Piped link
[[Main Page|different text]]
different text
Shortened sort-of-piped link
[[Internationalisation]]s
Internationalisations
Redirect
#REDIRECT [[Main Page]]

See also Help:Redirects

Main Page
Internal link to an anchor
[[#See also]]

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

#See_also
Internal link to an anchor at another page
[[Help:Images#See also]]
Help:Images#See_also
Internal link to the current page's talk page
[[{{TALKPAGENAME}}|Discussion]]

See also Help:Magic words#Page_names

Discussion
Internal link to a subpage
[[/example]]

Shortcut for [[Help:Links/example]]. See also Help:Subpages.

/example
Internal link to a category page
[[:Category:Help]]

See also Help:Categories

Category:Help
Internal link to an image or a file of other types
[[media:example.jpg]]

[[media:example.pdf]]

See also Help:Images

Media:Example.jpg

Media:Example.pdf

How to create an external link using Wikitext

To create external links using the "Rich Editor" see Create an external link.

  1. Type a single right-facing square bracket [
  2. Type or paste the url or website immediately after the single square bracket, without leaving a space between the bracket and the first letter or symbol of the url (website address). Remember, the url MUST begin with "http://" or "https://"
  3. If you want the url visible on the page, skip to step 5. If you want the url masked on the page, continue with step 4.
  4. After typing or pasting the exact url (website address) you are linking to, hit the spacebar once, and then type the text that you want to appear as the link on the page.
  5. Next type a single, left-facing square bracket ] without leaving a space between the bracket and the last letter or symbol of the url or text.

Examples:

Description You type You get
External link
http://mediawiki.org
http://mediawiki.org
External link with different label
[http://mediawiki.org MediaWiki]
MediaWiki
External link numbered
[http://mediawiki.org]
[1]
External link icons
[http://en.wikipedia.org/wiki/.avi video]
[http://en.wikipedia.org/wiki/.wav sound]
[http://en.wikipedia.org/wiki/.pdf document]

External link icons may differ depending on the file type of the target.

video sound document

External link to the same host
[http://{{SERVERNAME}}/pagename]
[2]
External link to other host passing the pagename
[http://google.com/search?q={{PAGENAMEE}}]
[3]
Mailto link
[mailto:info@example.org email me]
email me
Mailto named with subject line and body
[mailto:info@example.org?Subject=URL%20Encoded%20Subject&body=Body%20Text info]
info

Other links

Linking to a category

To create a link to a category, use a leading colon before the category name. (Without this colon, it will add the current page to the category.)

[[:Category:NAME]]


To change the display text, write the text inside the link tag after a pipe.

[[:Category:NAME|DISPLAY TEXT]]


Redirected categories must also use the colon, otherwise they will be added to the category instead of redirecting.

Creating Links Using Templates

Templates for creating common links are available, each with their own set of instructions:

External links:

  • Family History Library Catalog (FHLC). Instructions: {{FHL}}
  • Record Search. Instructions: {{RecordSearch}}
  • WorldCat/OCLC (English Language). Instructions: {{WorldCat}}
  • Wikipedia (English Language) - Inline link. Instructions: {{Wpd}}
  • Wikipedia (English Language) - Wikipedia box. Instructions: {{Wikipedia}}
  • Internet Archive (Wayback machine). Instructions: {{Wayback}}

Inter-language Links:

Tools.png Tip for wiki admins: See Manual:Interwiki for the management of interwiki links of your wiki.