PesWiki.com

Menu

Help:Link

Lasted edited by Andrew Munsey, updated on June 14, 2016 at 9:12 pm.

  • 110 errors has been found on this page. Administrator will correct this soon.
  • This page has been imported from the old peswiki website. This message will be removed once updated.

The basic function of creating links is very simple, though there are advanced methods for those inclined and capable of using them. We've divided this page into two sections: There was an error working with the wiki: Code[13] and There was an error working with the wiki: Code[14].

Simple

Intra-PESWiki links

When linking to pages within PESWiki, omit the "http://peswiki.com/index.php/" or "http://peswiki.com/energy/" that prefaces all page addresses, and use double square brackets before and after the link definition, with a vertical line | between the url and the link text. Or you can just post the address itself without the link text.

Example : An internal link to the home page at PESWiki (http://peswiki.com/index.php/Main_Page) will look like this

:: This code: Main Page

:: Will appear like this: Main Page

: or it can be formatted simply as

:: This code: Main Page

:: Will appear like this Main Page

It doesn't matter whether or not you include the underscore ("_") where the spaces go in the page name.

Links External to PESWiki

The formatting of links external to PESWiki is very simple. Just use one square bracket before and after the definition. Within the square brackets, begin with the url, followed by one space, followed by the hyperlink text. If you just want to show he url, without a hyperlink text, merely enter the url without the brackets, and PESWiki will show it as a hyperlink.

Example : Here is how you would format a link to PES Network's news page

:: This code: Free Energy News

:: Will appear like this: Free Energy News

: or alternatively, entering the raw url . . .

:: Entering this: http://freeenergynews.com

:: Will appear like this: http://freeenergynews.com

Some urls are badly formed and include spaces in them (or other such things), which will make it so that they do not work correctly. One alternative is to create an alternative url through free services such as http://tinyurl.com

Intra-Page Links

It is also possible to create a link to a section within a page. Sections are set off by headings which have equal signs before and after the heading name. For example, the code for the above heading is == Intra-Page Links ==

To create a link to a heading, all you need to do is use the double square brackets before and after the link set-up, and use the pound (#) sign before the heading name, followed by the vertical axis line |, followed by the hyperlink text. Alternatively, you can omit the hyperlink text and just show the raw header link.

Example: To link to the above heading

:: This code: There was an error working with the wiki: Code[15]

:: Will appear like this: There was an error working with the wiki: Code[16]

: or alternatively, entering the raw link . . .

:: This code: There was an error working with the wiki: Code[49]

:: Will appear like this: There was an error working with the wiki: Code[50]

---------

---------

---------

A D V A N C E D

---------

There was an error working with the wiki: Code[17] allow users to move between pages. For some basic information about using hyperlinks, see Help:Editing to distinguish them.

Wikilinks

A wikilink is an There was an error working with the wiki: Code[51] to another page within a There was an error working with the wiki: Code[52]. Although it is sometimes possible to code these links using There was an error working with the wiki: Code[53], a wiki will often provide its users with a unique There was an error working with the wiki: Code[54] that makes creating wikilinks simpler and a lot less time consuming. Such languages are called There was an error working with the wiki: Code[55]s or There was an error working with the wiki: Code[56]s. The There was an error working with the wiki: Code[57] for the wikitext language used by [There was an error working with the wiki: Code[1] There was an error working with the wiki: Code[2]] and all other There was an error working with the wiki: Code[58]s is defined by the software There was an error working with the wiki: Code[59].

Syntax

MediaWiki defines a wikilink as a closed set of inward facing square bracket pairs 'There was an error working with the wiki: Code[18]' is encountered (read from left to right).

{| class="wikitable"

{{wikilink_syntax_tbl|There was an error working with the wiki: Code[60]|=

|There was an error working with the wiki: Code[61]|=

|}}

{{wikilink_syntax_tbl|There was an error working with the wiki: Code[19]|=

|There was an error working with the wiki: Code[20]|=

| (link to a, labelled b, a so-called There was an error working with the wiki: Code[21])}}

{{wikilink_syntax_tbl|There was an error working with the wiki: Code[22]|=

|There was an error working with the wiki: Code[23]|=

|(the leftmost pipe character separates target from label)}}

{{wikilink_syntax_tbl|There was an error working with the wiki: Code[62]b|=

|There was an error working with the wiki: Code[63]b|=

|just like There was an error working with the wiki: Code[24] does: There was an error working with the wiki: Code[24]}}

{{wikilink_syntax_tbl|There was an error working with the wiki: Code[26]c|=

|There was an error working with the wiki: Code[27]c|=

|just like There was an error working with the wiki: Code[28] does: There was an error working with the wiki: Code[28]}}

{{wikilink_syntax_tbl|aThere was an error working with the wiki: Code[64]|=

|aThere was an error working with the wiki: Code[65]|=

|}}

{{wikilink_syntax_tbl|There was an error working with the wiki: Code[66]b|=

|There was an error working with the wiki: Code[67]b|=

|}}

{{wikilink_syntax_tbl|There was an error working with the wiki: Code[68]b|=

|There was an error working with the wiki: Code[69]b|=

|}}

{{wikilink_syntax_tbl|There was an error working with the wiki: Code[70]b|=

|There was an error working with the wiki: Code[71]b|=

|}}

{{wikilink_syntax_tbl|There was an error working with the wiki: Code[30]cd|=

|There was an error working with the wiki: Code[31]cd|=

|}}

{{wikilink_syntax_tbl|There was an error working with the wiki: Code[72]There was an error working with the wiki: Code[73]|=

|There was an error working with the wiki: Code[74]There was an error working with the wiki: Code[75]|=

|}}

|}

(two links, but looking equal to the single link There was an error working with the wiki: Code[76]), even if the links are underlined (There was an error working with the wiki: Code[77] There was an error working with the wiki: Code[78] and There was an error working with the wiki: Code[79] look the same only if links are not underlined)

Links with parameters (the link name) are said to be "piped" because of the pipe symbol used.

MediaWiki automatically checks if the target of a wikilink exists ("existence detection"). If the page doesn't exist, the link leads to the editing screen, and it is assigned the class "new". Such wikilinks are nicknamed "red links" because they are colored red in the default stylesheet on a default installation. Red links are useful in determining the current status of the page (created or not created), create links to a future page, facilitates and incites page creation.

The existence of an internal link from a page to an existing or non-existing page is recorded in the There was an error working with the wiki: Code[80].

Stub feature

A wikilink to an existing page will be in class 'stub' if the page is in the main namespace, it is not a redirect, 'and' the number of bytes of the wikitext is less than the "threshold for stub display" set in the Help:Preferences.

This allows users to immediately identify links to very short pages that probably need to be expanded. Alternately, a user may set a very high threshold to achieve any of the following:

Identify links to very large pages. However, the criterion is the size of the wikitext possible inclusion of templates and images can make the rendered page large, even if the amount of wikitext is small.

Determine at a glance whether a link leads to the main namespace or not. However, this does not take into account redirects to the main namespace (even if the redirect itself is in the main namespace).

Identify links to redirects, for clean-up work such as bypassing redirects.

However, section linking to a "stub" does not work. Although this is normally a minor issue, this may cause problems with users who set a very high threshold.

Interwiki links

An There was an error working with the wiki: Code[32] links a page to a page on another website. Unlike the name suggests, the target site need not be a wiki, but it has to be on the There was an error working with the wiki: Code[33] specified for the source wiki. These links have the associated CSS class "extiw". These are in the same form as wikilinks above, but take a prefix which specifies the target site. For example, on Wikimedia projects and many other wikis There was an error working with the wiki: Code[81] links to PESWiki's main page. The prefix can be hidden using the same piped syntax as wikilinks.

Interwiki links to the same project

Although interwiki links can be used to point to a wiki from itself, this is not generally recommended. MediaWiki does not detect whether or not the target page of an interwiki list exists, so there is no special formatting and the link is always to the view page. Further, MediaWiki does not check if the page is linking to itself. A There was an error working with the wiki: Code[34] is bolded (like There was an error working with the wiki: Code[82]), whereas a self interwiki link is normal (There was an error working with the wiki: Code[83]).

Pros:

A copy of the wikitext on a sister project may still point to the same page. Sometimes two prefixes are needed for that purpose, e.g. There was an error working with the wiki: Code[84].

External links

External links use absolute URLs to link directly to any webpage. These links have the associated CSS class "external". Simple written external links will be displayed in their entirety: http://www.example.org. External links with square brackets are in the form link name (resulting in link name), with the link name separated from the URL by a space. Links with square brackets without link names will be numbered: becomes [http://www.example.org.

Unlike in the case of internal links, as gives as.

See There was an error working with the wiki: Code[35] for more detailed information.

There was an error working with the wiki: Code[85] finds all pages linking to a given site.

External links to the same project

External links are often used to use special URL parameters in links. This allows links directly to the edit history of a page, to a page in edit view, a diff of two versions, et cetera. They can also be used to create a There was an error working with the wiki: Code[36].

However, the use of external links to link to a normal page on the same project is not recommended. These links benefit from none of the features of a wikilink, and may break the web of links when the content is exported to another domain.

Arrow icon

Monobook skin produces an arrow icon after every external link. This can be suppressed with class="plainlinks":

http://a gives http://a

http://a gives http://a

Section linking (anchors)

Links in the form There was an error working with the wiki: Code[37]. It is possible to create an arbitrary anchor name using the HTML code .

Anchor links can also be appended to any type of link for more information, see Help:Section.

Problems with page name conversion

Note that if the page name is automatically converted (for example, from "index.php?main Page" to "index.php?Main Page"), the section link will still work but will disappear from the address bar. As a consequence, this will make it more difficult to bookmark the section itself. This is not applicable for wikilinks, because the conversions have already taken place on Preview or Save of the referring page.

For example, consider http://peswiki.com/index.php?PESWwiki:how_to_edit_a_page#Links_and_URLs. In this case, the anchor part of the address will disappear because the "how" will be converted to "How".

Redirects with section links

A Help:Redirect to a page section does not go to the section. However, one can add the section anyway as a clarification, and it will work if the redirect is manually clicked from the redirect page. However, links with a section to a redirect will lead to the section on the redirect's page.

Subpage feature

MediaWiki has a subpage feature, although activation depends on project and namespace. If activated, the following applies (if not, "A/b" is just a page with that name).

A There was an error working with the wiki: Code[38] of pages is established by using forward slashes in pagenames: A/b is a child of A, hence A is a parent of A/b also A/b/c is a child of A/b A/a, A/b, and A/c are siblings.

At the top of the subpage body links to all ancestor pages are shown automatically, without any corresponding wikitext. The links show up even if the parent page does not exist, but the sequence of ancestors stops before any non-existing ancestor page (e.g., if the grandparent page does not exist, the parent page is not shown either). Like most letters of a page name, the first letter after the slash is case-sensitive "/subpage" and "/Subpage" are different pages.

Help:What links here and There was an error working with the wiki: Code[39] ignore these automatic links.

Relative links

Relative links still work if all pages of a tree are renamed according a name change of the root, including making it a child of a new root.

Inside a subpage hierarchy the following relative links can be used:

There was an error working with the wiki: Code[86] links to the parent of the current subpage, e.g., on A/b it links to A, on A/b/c it links to A/b.

There was an error working with the wiki: Code[87] links to a sibling of the current subpage, e.g., on A/b, it links to A/s.

There was an error working with the wiki: Code[88] links to a subpage, e.g. on A it is the same as There was an error working with the wiki: Code[89].

See also There was an error working with the wiki: Code[90], and the example pages There was an error working with the wiki: Code[91] and There was an error working with the wiki: Code[92]. For the latter the subpage feature does not work because of the namespace.

User space

Subpages of a user page (There was an error working with the wiki: Code[93]) are considered to be in that user's "user space". Rules are often relaxed in a user's own subpages, whereas they are typically tightened for a user editing another user's subpages.

Unintended subpage structure

Any slash in a pagename causes a subpage structure, e.g. There was an error working with the wiki: Code[94] is a subpage of "Subpage demo Season 2006". As long as the latter does not exist, this has no effect on the former, However, a page with a slash in its name cannot be the root page of a subpage structure. For example, There was an error working with the wiki: Code[95] does not show its parent, because its unintended grandparent does not exist. A dummy grandparent page can fix this.

Subpage activation

Wikipedia has this feature activated in all talk namespaces and the user and project namespace. The Meta-Wiki also has it in the main namespace. The default is set in There was an error working with the wiki: Code[40]As of revision 1.21, the following namespaces have it activated by default: Special, Main talk, User and User_talk, and Image_talk. Settings per project are changed in [[LocalSettings.php]http://cvs.sourceforge.net/viewcvs.py/wikipedia/phpwiki/newcodebase/LocalSettings.php?rev=1.25&view=markup.

Miscellaneous

Linking to a page with images

It is possible to use images as links to other pages. For more information, see There was an error working with the wiki: Code[41].

Hover box

On some browsers, holding the cursor over link will show a hover box containing the text of the link's HTML title attribute. MediaWiki sets this to the target page name (without the possible section indication) if it's a wikilink, the page name with prefix if it's an interwiki link, and the URL if it's an external link.

This can be switched off in the Help:Preferences. The browser may also show similar info, but with the possible section indication, in the address bar.

For these effects a piped link is useful even if it not followed for example, for displaying the meaning of an acronym (e.g. Point of View code is: Point of View) or any other remark. It is possible to produce a hover box without a link, see There was an error working with the wiki: Code[7].

Disallowed characters

In internal and interwiki link style, a plus sign in a page name is not allowed, the HTML and hence the rendered page just shows the wikitext, e.g. There was an error working with the wiki: Code[96]. In external link style a plus sign in the URL is retained. It is often equivalent with a space. See also below.

In accordance with the rules explained in There was an error working with the wiki: Code[42] in wiki and interwiki links. For example, "There was an error working with the wiki: Code[97]" becomes "There was an error working with the wiki: Code[98]". However, the opposite is true for external links literal characters are converted into non-literal characters. For example, most browsers will convert ".../wiki/!" to ".../wiki/%21".

A code like %70 in a redirect disables it, although the link works from the redirect page. For a redirect that works, the redirect page shows the canonical form of the target, unlike its preview page, which renders the link in the usual way.

Special pipe syntax

Using an empty pipe syntax on wiki and interwiki links will hide interwiki prefixes and parentheses. For example, There was an error working with the wiki: Code[43]. This pipe syntax should only be used where the unqualified reference is not ambiguous, such as in an article about the solar system. See There was an error working with the wiki: Code[99].

Additional effects of links

There was an error working with the wiki: Code[44]

Help:What links heres

Help:Preferences

Using a space after the pipe syntax (Main Page) produces (perhaps depending on the browser) a space only, not a link ("Main Page"), but it is treated as a link for the "what links here" feature.

Links from a page

With There was an error working with the wiki: Code[100] the links from page pagename, sorted by namespace, and for each namespace alphabetically, are given by There was an error working with the wiki: Code[8]There was an error working with the wiki: Code[9]/query.php?what=links&titles=pagename , e.g. There was an error working with the wiki: Code[8]There was an error working with the wiki: Code[9]/query.php?what=links&titles=There was an error working with the wiki: Code[12] .

See also

There was an error working with the wiki: Code[101]

Help:Editing

There was an error working with the wiki: Code[102]

There was an error working with the wiki: Code[103]

There was an error working with the wiki: Code[104]

There was an error working with the wiki: Code[105] (and the next section)

There was an error working with the wiki: Code[106]

Help:What links here

There was an error working with the wiki: Code[107]

There was an error working with the wiki: Code[108]

There was an error working with the wiki: Code[109]

There was an error working with the wiki: Code[110]

There was an error working with the wiki: Code[45]

There was an error working with the wiki: Code[46]

There was an error working with the wiki: Code[47]

There was an error working with the wiki: Code[48]

http://en.wikipedia.org/wiki/Help:Wiki_markup#Links_and_URLs

- Help:Contents

- Main Page

Comments