| Line 125: |
Line 125: |
| | You will often want to make clickable ''links'' to other pages. | | You will often want to make clickable ''links'' to other pages. |
| | | | |
| − | {|width="100%" border="1" cellpadding="2" cellspacing="0" | + | {| {{Prettytable}} |
| | |- | | |- |
| − | !What it looks like
| + | |{{Hl3}}|'''Description''' |
| − | !What you type
| + | |{{Hl3}}|'''You type''' |
| | + | |{{Hl3}}|'''You get''' |
| | |- | | |- |
| − | | | + | |Internal link |
| − | Here's a link to a page named [[Official position]].
| + | |<tt><nowiki>[[Main Page]]</nowiki></tt> |
| − | You can even say [[official position]]s
| + | |[[Main Page]] |
| − | and the link will show up correctly.
| |
| − | |<pre> | |
| − | Here's a link to a page named [[Official position]].
| |
| − | You can even say [[official position]]s
| |
| − | and the link will show up correctly.
| |
| − | </pre>
| |
| | |- | | |- |
| − | | | + | |Category link |
| − | You can put formatting around a link.
| + | |<tt><nowiki>[[:Category:Help]]</nowiki></tt> |
| − | Example: ''[[Wikipedia]]''.
| + | |[[:Category:Help]] |
| − | |<pre>
| |
| − | You can put formatting around a link.
| |
| − | Example: ''[[Wikipedia]]''.
| |
| − | </pre>
| |
| | |- | | |- |
| − | | | + | |Piped link |
| − | The ''first letter'' of articles is automatically
| + | |<tt><nowiki>[[Main Page|different text]]</nowiki></tt> |
| − | capitalized, so [[wikipedia]] goes to the same place
| + | |[[Main Page|different text]] |
| − | as [[Wikipedia]]. Capitalization matters after the
| |
| − | first letter.
| |
| − | |<pre> | |
| − | The ''first letter'' of articles is automatically
| |
| − | capitalized, so [[wikipedia]] goes to the same place
| |
| − | as [[Wikipedia]]. Capitalization matters after the
| |
| − | first letter.
| |
| − | </pre>
| |
| | |- | | |- |
| − | | | + | |Anchor link |
| − | [[The weather in London]] is a page that doesn't exist | + | |<tt><nowiki>[[#External links|Anchor link]]</nowiki></tt> |
| − | yet. You could create it by clicking on the link.
| + | |[[#External links|Anchor link]] |
| − | |<pre>
| |
| − | [[The weather in London]] is a page that doesn't exist | |
| − | yet. You could create it by clicking on the link.
| |
| − | </pre>
| |
| | |- | | |- |
| − | | | + | |External link |
| − | You can link to a page section by its title:
| + | |<tt><nowiki>http://mediawiki.org</nowiki></tt> |
| − | | + | |http://mediawiki.org |
| − | *[[List of cities by country#Morocco]].
| |
| − | | |
| − | If multiple sections have the same title, add
| |
| − | a number. [[#Example section 3]] goes to the
| |
| − | third section named "Example section".
| |
| − | |<pre> | |
| − | You can link to a page section by its title:
| |
| − | | |
| − | *[[List of cities by country#Morocco]].
| |
| − | | |
| − | If multiple sections have the same title, add
| |
| − | a number. [[#Example section 3]] goes to the
| |
| − | third section named "Example section".
| |
| − | </pre> | |
| | |- | | |- |
| − | | | + | |Internal link to image file |
| − | You can make a link point to a different place
| + | |<tt><nowiki>[[media:example.jpg]]</nowiki></tt> |
| − | with a [[Help:Piped link|piped link]]. Put the link
| + | |[[media:example.jpg]] |
| − | target first, then the pipe character "|", then
| |
| − | the link text.
| |
| − | | |
| − | *[[Help:Link|About Links]]
| |
| − | *[[List of cities by country#Morocco|
| |
| − | Cities in Morocco]]
| |
| − | | |
| − | Or you can use the "pipe trick" so that text in parentheses or text after a comma does not appear.
| |
| − | | |
| − | *[[Spinning (textiles)|Spinning]]
| |
| − | *[[Boston, Massachusetts|Boston]]
| |
| − | |<pre>
| |
| − | | |
| − | *[[Help:Link|About Links]]
| |
| − | *[[List of cities by country#Morocco|
| |
| − | Cities in Morocco]]
| |
| − | | |
| − | *[[Spinning (textiles)|]]
| |
| − | *[[Boston, Massachusetts|]]
| |
| − | </pre>
| |
| | |- | | |- |
| − | | | + | |External link,<br /> |
| − | You can make an external link just by typing a URL:
| + | different title |
| − | http://www.nupedia.com
| + | |<tt><nowiki>[http://mediawiki.org MediaWiki]</nowiki></tt> |
| − | | + | |[http://mediawiki.org MediaWiki] |
| − | You can give it a title:
| |
| − | [http://www.nupedia.com Nupedia] | |
| − | | |
| − | Or leave the title blank:
| |
| − | [http://www.nupedia.com]
| |
| − | | | |
| − | <pre>
| |
| − | You can make an external link just by typing a URL:
| |
| − | http://www.nupedia.com
| |
| − | | |
| − | You can give it a title:
| |
| − | [http://www.nupedia.com Nupedia]
| |
| − | | |
| − | Or leave the title blank:
| |
| − | [http://www.nupedia.com] | |
| − | </pre>
| |
| | |- | | |- |
| − | | | + | |External link,<br /> |
| − | Linking to an e-mail address works the same way:
| + | unnamed |
| − | mailto:someone@example.com or
| + | |<tt><nowiki>[http://mediawiki.org]</nowiki></tt> |
| − | [mailto:someone@example.com someone] | + | |[http://mediawiki.org] |
| − | |
| |
| − | <pre> | |
| − | Linking to an e-mail address works the same way:
| |
| − | mailto:someone@example.com or
| |
| − | [mailto:someone@example.com someone] | |
| − | </pre>
| |
| | |- | | |- |
| − | | | + | |External link,<br /> |
| − | You can [[Help:Redirect|redirect]] the user to another page.
| + | same host unnamed |
| − | |<pre> | + | |<tt><nowiki>[http://{{SERVERNAME}}/pagename]</nowiki></tt> |
| − | #REDIRECT [[Official position]]
| + | |[http://{{SERVERNAME}}/pagename] |
| − | </pre> | |
| | |- | | |- |
| − | | | + | |Interwiki link |
| − | [[Help:Category|Category links]] do not show up in line
| + | |<tt><nowiki>[[Wikipedia:MediaWiki]]</nowiki></tt> |
| − | but instead at page bottom ''and cause the page to be
| + | |[[Wikipedia:MediaWiki]] |
| − | listed in the category.''
| |
| − | [[Category:English documentation]] | |
| − | | |
| − | Add an extra colon to ''link'' to a category in line
| |
| − | without causing the page to be listed in the category:
| |
| − | [[:Category:English documentation]]
| |
| − | |<pre>
| |
| − | [[Help:Category|Category links]] do not show up in line
| |
| − | but instead at page bottom ''and cause the page to be
| |
| − | listed in the category.''
| |
| − | [[Category:English documentation]] | |
| − | | |
| − | Add an extra colon to ''link'' to a category in line
| |
| − | without causing the page to be listed in the category:
| |
| − | [[:Category:English documentation]]
| |
| − | </pre>
| |
| | |- | | |- |
| − | | | + | |mailto |
| − | The Wiki reformats linked dates to match the reader's
| + | |<tt><nowiki>mailto:info@example.org</nowiki></tt> |
| − | date preferences. These three dates will show up the
| + | |mailto:info@example.org |
| − | same if you choose a format in your
| + | |- |
| − | [[Special:Preferences|Preferences]]: | + | |mailto unnamed |
| − | * [[1969-07-20]]
| + | |<tt><nowiki>[mailto:info@example.org]</nowiki></tt> |
| − | * [[July 20]], [[1969]]
| + | |[mailto:info@example.org] |
| − | * [[20 July]] [[1969]]
| + | |- |
| − | |<pre> | + | |mailto named |
| − | The Wiki reformats linked dates to match the reader's
| + | |<tt><nowiki>[mailto:info@example.org info]</nowiki></tt> |
| − | date preferences. These three dates will show up the
| + | |[mailto:info@example.org info] |
| − | same if you choose a format in your
| + | |- |
| − | [[Special:Preferences|]]: | + | |redirect |
| − | * [[1969-07-20]]
| + | |<tt><nowiki>#REDIRECT [[Main Page]]</nowiki></tt> |
| − | * [[July 20]], [[1969]]
| + | | → [[Main Page]] |
| − | * [[20 July]] [[1969]]
| |
| − | </pre>
| |
| | |} | | |} |
| | | | |