This page is a translated version of the page Help:Links and the translation is 100% complete.
PD Let op: Als u deze pagina bewerkt, gaat u akkoord met het vrijgeven van uw bijdragen onder de CC0. Zie Helppagina’s Publiek Domein voor meer informatie. PD

Er zijn vijf typen links in MediaWiki:

  1. Interne links naar andere pagina's in dezelfde wiki
  2. Externe links naar andere websites
  3. Externe links naar interne pagina's in dezelfde wiki
  4. Interwiki links naar andere websites met gebruikmaking van een prefix
  5. Interlanguage links naar andere websites aangemeld als anderstalige versies van de wiki

Merk op dat deze lijst geen categorie links en afbeelding links bevat, die gebruikt worden om pagina's in respectievelijk categorieën te plaatsen en afbeeldingen of andere media-bestanden weer te geven.

Interne links

Om een interne link aan te maken naar een pagina op dezelfde wiki ("wikilink"), gebruik dubbele vierkante haken, [[zoals dit]]. Als u de wijzigingen vooraf bekijkt of opslaat, ziet u een link naar de doelpagina. Als de pagina bestaat, wordt de link in blauw weergeven (zoals "aan te maken" in de eerste zin van deze paragraaf); als de pagina niet bestaat, wordt de link rood (dus een link [[zoals deze]] wordt zoals dit). De kleuren kunnen anders zijn als niet de standaardwaarden uit de CSS gebruikt worden. Als u op een "rode link" drukt, dus naar een ontbrekende pagina, kan een gebruiker gewoonlijk de pagina aanmaken.

Om een tekst (niet noodzakelijkerwijs een paginatitel) als link te tonen, gebruik een "verticale streep" of "pipe" als volgt:[[Help:Categories|categorie links]] geeft de link categorie links.

De eerste letter van de link is gewoonlijk niet hoofdlettergevoelig (tenzij de wiki anders ingesteld is), wat betekent dat Hoe bij te dragen en hoe bij te dragen gelijk is. Elk daaropvolgend teken moet echter precies overeenstemmen (dus Hoe bij te Dragen en Hoe bij te dragen is niet hetzelfde). Ruimtes in de titel van de pagina kunnen onderstreept getoond worden (dus Hoe bij te dagen en Hoe_bij_te_dragen' is weer hetzelfde), maar het onderstrepen in links maakt dat zichtbaar in de pagina-tekst (dat kan voorkomen worden door met behulp van de "|").

Als de paginatitel waarnaar u linkt, de pagina is die u nu bewerkt, dan is het resultaat niet een hyperlink maar een eenvoudige vette tekst (op deze pagina, bijvoorbeeld, geeft de code [[Help:Links/nl]] het resultaat Help:Links/nl). Als u een wikilink naar de huidige pagina wilt maken, dan wilt u waarschijnlijk naar een bepaalde sectie linken of een anker binnen de pagina gebruiken; zie de onderstaande voorbeelden.

MediaWiki gebruikt de tabel pagelinks om de interne wikilinks te volgen.

Naam/Beschrijving Syntaxis Resultaat
Interne link
[[Main Page]]

[[Help:Contents]]

[[Extension:DynamicPageList (Wikimedia)]]

Main Page

Help:Contents

Extension:DynamicPageList (Wikimedia)

Doorgesluisde link
[[Help:Editing pages|editing help]]

Links na een sectie/anker binnen de doelpagina.

[[Help:Editing pages#Preview|previewing]]

Interne link naar een anker vanuit andere tekst

[[#See also|different text]]

Zie ook meta:Help:Piped link.

editing help

previewing

different text

Pipe trick
[[Manual:Extensions|]]

[[User:John Doe|]]

[[Extension:DynamicPageList (Wikimedia)|]]

[[Extension:DynamicPageList (third-party)|]]

Het gebruik van de verticale streep kan tot dezelfde tekst leiden voor verschillende plekken waarna toe gesprongen wordt, zoals blijkt uit de DynamicPageList voorbeelden. Na de verticale streep staat alleen maar de tekst die in plaats van de link getoond wordt.

Extensions

John Doe

DynamicPageList

DynamicPageList

Woordeinde links
[[Help]]s

[[Help]]ing

[[Help]]ers

[[Help]]almostanylettersyoulikehere

[[Help]]BUTnotalways

Volgt de zogenoemde "linktrail regels" aangepast aan de taal.

Helps

Helping

Helpers

Helpalmostanylettersyoulikehere

HelpBUTnotalways

Vermijden van woordeinde links
[[Help]]<nowiki />ful advice

[[wikipedia:GNU General Public License|GPL]]<nowiki />v3

Helpful advice

GPLv3

Link naar een anker op dezelfde pagina
[[#See also]]

Ankers zijn automatisch voorzien van sectie koppen aan de boven ([[#top]]) van de pagina.

#See also
Een anker definiëren voor binnenkomende links
<div id="Unique anchor name 1">optional text</div>

<span id="Unique anchor name 2">optional text</span>

Opgebouwd worden resp. blok-level en inline. Door dit te doen kan toegestaan worden dat [[#Unique anchor name 1]] op dezelfde pagina [[Help:Links/nl#Unique anchor name 1]] op een andere pagina. Laat de "optionele tekst" weg bij een niet zichtbaar anker.

Het anker gebruiken in een sectie-koptekst

==<span id="Alternate Section Title"></span>Section heading==

Let op de plaats. Dit moet de tag "span" zijn, niet een tag "div". (Zulke ankers staan toe dat een sectie een andere naam krijgt zonder dat de links er naar toe niet meer werken.)

optionele tekst

optionele tekst

Section heading
Link naar een anker op een andere pagina
[[Help:Images#Supported media types for images]]
Help:Images#Supported media types for images
Link naar de discussiepagina van de huidige pagina
[[{{TALKPAGENAME}}|Discussion]]

Zie ook paginanamen

Discussion
Link naar een subpagina
[[/example]]

Afkorting voor [[Help:Links/example|/example]]. Zie ook Help:Subpagina's .

/example
Link naar een subpagina zonder de slash
[[/example/]]

Afkorting voor [[Help:Links/example|example]].

example
Link naar een subpagina van de pagina boven de huidige pagina. Kan alleen worden gebruikt op subpagina's.
[[../example2]]

Afkorting voor [[Help:Links/example2|example2]] als de link staat op de pagina [[Help:Links/example|example]].

example2
Zichtbare link naar een categorie-pagina
[[:Category:Help]]

Zonder de voorste dubbele punt zou de link niet zichtbaar zijn en zou de pagina in de categorie geplaatst worden; dit is een veel gemaakte fout. Zie ook Help:Categorieën .

Category:Help
Zichtbare link naar een afbeelding of een media-bestand

File:Example.jpg

file label

Media:Example.jpg

file label

Link naar een pagina afhankelijk van gebruiker (gebruikerspagina,... )
[[Special:MyPage]]

[[Special:MyTalk]]

[[Special:Preferences]]

Special:MyPage

Special:MyTalk

Special:Preferences

Interne link na een specifieke revisie
[[Special:PermanentLink/2393992]]

Het nummer van een revisie staat op elke pagina in de geschiedenis van de bewerkingen. (Het is normaal om links naar specifieke revisies te zien die geïmplementeerd worden als externe link, dat is een gemakkelijke manier om de gehele URL te knippen en plakken.)

Special:PermanentLink/2393992
Interne link na een "verschil"
[[Special:Diff/2393992]]

[[Special:Diff/2390639/2393992]]

De standaard (in de eerste voorbeeld hierboven) is om de wijzigingen te tonen vanaf de vorige revisie. Zien ook het commentaar bij het vorige item.

Special:Diff/2393992

Special:Diff/2390639/2393992

Doorverwijzing
#REDIRECT [[Main Page]]

Moet de eerste en enige regel zijn op de pagina. Zie Help:Doorverwijzingen .

  Main Page

Externe links

Om een externe link aan te maken plaatst u de URL, gevolgd door een spatie en de naam van de pagina waarnaar u wilt linken, in enkelvoudige rechte haken. Als u de vertaling opslaat zult u een nieuwe link zien die naar uw pagina verwijst met een pijltjes icoon erachter om aan te geven dat het kan linken naar een andere site.

Beschrijving U tikt in U krijgt
Externe link met gespecificeerde tekst
[https://mediawiki.org MediaWiki]
MediaWiki
Genummerde externe link
[https://mediawiki.org]

Als u de tekst van de link weglaat dan gebeurt er dit. Meerdere links van dit type op dezelfde pagina worden dan oplopend genummerd.

[1]
Kale externe link
https://mediawiki.org

URL'die beginnen met "http://" of "https://" worden automatisch gelinkt, ook zonder gebruik van haakjes.

https://mediawiki.org
Vermijden van automatisch gekoppelde URL's
<nowiki>https://mediawiki.org</nowiki>
https://mediawiki.org
Protocol relatieve externe link
[//en.wikipedia.org Wikipedia]

[//en.wikipedia.org //en.wikipedia.org]

De link is HTTP of HTTPS, afhankelijk van het protocol van de pagina die nu bekeken wordt (wat per gebruiker kan verschillen). Dit wordt alleen binnen vierkante haakjes [ ] ondersteund. Het zelf gebruiken van "//en.wikipedia.org" zorgt niet voor een link.

Wikipedia

//en.wikipedia.org

Externe link naar de huidige server
https://{{SERVERNAME}}/pagename
https://www.mediawiki.org/pagename
Externe link naar een andere host met doorgeven van paginanaam
https://google.com/search?q={{PAGENAMEE}}

Zie ook: URL encoded paginanamen, Manual:PAGENAMEE encoding

https://google.com/search?q=Links
Mailto link
[mailto:info@example.org email me]
email me
Mailto genaamd met onderwerp en body
[mailto:info@example.org?Subject=URL%20Encoded%20Subject&body=Body%20Text info]
info
Aangepaste URI
[skype:echo123 call me]

Elke URI die u wilt toevoegen moet eerst met $wgUrlProtocols worden gedeclareerd. (Dit voorbeeld is uitgeschakeld op de MediaWiki.org)

[skype:echo123 call me]

E-mail links gebruiken

Email links use mailto: before the address. They're written like this: [mailto:anyone@example.org address name] (resulting in address name). If there's no name, the address is automatically numbered, like this: [mailto:anyone@example.org] becomes [2]. Addresses without square brackets won't be linked, e.g., anyone@example.com. You can also add a CC using [mailto:anyone@example.org?cc=anyone2@example.org address name] (resulting in address name). To add a subject, use [mailto:me@me.com?subject=Me] "

Externe links naar interne pagina's

Om een link toe te voegen naar een pagina op dezelfde wiki met gebruik van URL query parameters, u kunt mogelijk de syntaxis voor een externe link moeten gebruiken.

Beschrijving U typt U krijgt
Externe link naar de wijzigpagina van de huidige pagina
[https://www.mediawiki.org/w/index.php?title=Help:Links&action=edit Edit this page]

[{{fullurl:{{FULLPAGENAME}}|action=edit}} Edit this page]

Zie ook URL_data en hierboven Externe links.

Edit this page

Edit this page

Externe link naar de huidige bewerkingspagina, opgemaakt als een interne link
<span class="plainlinks">[https://www.mediawiki.org/w/index.php?title=Help:Links&action=edit Edit this page]</span>

De class plainlinks kan worden gebruikt als u een externe link als een interne wilt tonen, door het wegdrukken van het icoon wat er normaal gesproken achter komt te staan.

Edit this page

The arrow icon

Some skins add an arrow icon after each external link by default. However, this can be avoided by using class="plainlinks". For instance:

  • [http://a a] gives a
  • <span class="plainlinks">[http://a a]</span> gives a

Using Linksearch

Special:Linksearch is a built-in tool that helps find pages linked to a specific URL. By using the externallinks table, it generates a comprehensive list of page names where the link originates, along with the complete target link for each source page. You can search in all namespaces or just one. It supports wildcard (*) use, so you can search by top-level domain (e.g. [3]), second-level domain (e.g. [4]), etc. or refine your search by specifying parts of the URL e.g. [5].

Notes:

  • Avoid including "http://".
  • The program might not return any results if there is a colon in the URL.
  • MediaWiki page names in URLs should have underscores instead of spaces. The Linksearch function also requires underscores in URLs.
  • Linksearch is sensitive to capitalization, multiple underscores, and the use of "index.php". It may not find alternative URLs even if they lead to the same target. Therefore, when creating an external link, it's best to use the canonical form of the URL. If the address bar displays a modified URL after following a link, update the URL in the link accordingly for optimal use of Linksearch.
  • The list is sorted by URL, using standard page name order. Note that an underscore, unlike a blank space, is alphabetically positioned between "Z" and "a".

Using backlinks

Normally, internal links within a project are easy to spot and useful for finding related pages. But when there's a mix of internal and external links, it can be tricky to track backlinks, it necessitates the use of both "Help:What links here" and "Linksearch". However, for links to specific sections or anchors, it's possible to include both an internal link and, with CSS styling using "display=none" an external link to provide backlink.

External links are better than interwiki links. With Linksearch, you can even find backlinks to specific sections or anchors. So, combining both internal and external links while hiding the external ones "<span style="display:none">http://...</span>", gives us the best of both worlds.

Beperkingen

  1. Externe links ondersteunen niet Word-ending links.
  2. Externe links tellen niet mee als Special:WhatLinksHere (Wat linkt hier naar toe).

Interwiki links

Interwiki links zijn links met een interne opmaak naar andere websites (dat hoeven trouwens geen wiki's te zijn). Voorbeeld, u kunt linken naar het artikel https://en.wikipedia.org/wiki/Sunflower door het intikken van [[wikipedia:Sunflower]] of, op deze wiki, het afgekorte [[w:Sunflower]]. Beide geeft een link naar wikipedia:Sunflower. Dit werkt omdat MediaWiki standaard configureert wikipedia: als een "interwiki voorvoegsel", die omgezet wordt naar https://en.wikipedia.org/wiki/, indien gebruikt binnen [[ ]]. (Het kan niet werken als uw beheerder van de wiki de instelling heeft aangepast.) Anders dan interne links, gebruikt een interwiki link geen detectie of de pagina bestaat, dus een interwiki link wordt altijd blauw getoond, ook al bestaat de pagina niet op de andere wiki.

Gelijk aan interne pagina links, kunt u links met een verticaal streepje aanmaken, met een andere linklabel, bijv. [[wikipedia:Sunflower|grote gele bloem]] is de link grote gele bloem en [[wikipedia:Sunflower|Zonnebloem]] is de link Zonnebloem.

Interwiki links zijn dus eigenlijk afkortingen voor veel gebruikte langere externe links. Een gelijksoortige link kan worden aangemaakt als [https://en.wikipedia.org/wiki/Sunflower big yellow flower].

Meer details zijn beschikbaar op Manual:Interwiki en m:Help:Interwiki linking. Uw wiki heeft mogelijk een Special:Interwiki pagina met interwiki-voorvoegsels die worden ondersteund; de standaard interwiki-lijst. U kunt de tabel interwiki op uw website wijzigen.

Interlanguage links

Indien uw wiki een andere taalversie heeft, kunt u de interlanguage links in de zijbalk, vinden, net onder de Hulpmiddelen in een sectie “in andere talen.”

De wiki opmaak van een interlanguage link ziet er vrijwel uit als een interwiki link, maar gedraagt zich als een categorie link omdat het op een speciale manier wordt opgebouwd. Categorie links worden meestal in een speciale lijst onderaan de pagina getoond, interlanguage links worden in een lijst in de zijbalk van de pagina getoond (of ergens anders, afhankelijk van de configuratie van de wiki en het gebruikte skin).

Het doel van interlanguage links is het linken naar pagina's met dezelfde onderwerpen in verschillende talen. Om er een aan te maken, tik [[taal voorvoegsel:paginanaam]] ergens op de pagina in (voorkeur onderin, zoals bij categorie links); het voorvoegsel voor de taal is op uw wiki gespecificeerd (maar het zal wel overeenkomen met de ). De interlanguage link is een kant op, het wijst niet terug naar de pagina in de andere taal. Daarvoor moet ook daar een gelijksoortige link geplaatst worden. Het werkt anders dan de link om te bewerken in de talen-sectie van Wikipedia-versies. Maar het kan over alle namespaces gebruikt worden, inclusief 'User:' om naar andere profielen in andere talen te wijzen.

Als u de interlanguage link op een bepaalde plek wilt weergeven in de inhoud van de pagina in plaats van in de zijbalk, plaats een dubbele punt toe voor het taalvoorvoegsel:

[[:en:Sunflower]]en:Sunflower

Als een link interwiki en interlanguage is, is de volgorde wikipedia:en:Sunflower.

Voor meer informatie, zie Interlanguage links.

Anchors

Linking to an anchor

Links in the format [[#anchor_name]] will direct to the first matching anchor on the page, typically corresponding to the first identical section heading.

You can add an [[#anchor_name]] to a link, directing it to the first matching section heading (or anchor) on the named page:

[[Help:Editing#Advanced editing]]

https://www.mediawiki.org/wiki/Help:Editing#Advanced_editing

Using an automatic anchor

Section headings serve as anchors, using the heading text as the anchor name. If there are multiple sections with identical headings, each subsequent occurrence is appended with "_2", "_3", etc.

The anchor #toc links to the page's table of contents, except when there's a section titled "toc."

A manual anchor

Manually-set anchors are beneficial for linking to "unlinkable" elements such as tables (titles or cells) or sections of plain text. For instance, in the External links to internal pages section above, although the column text "Description" resembles a (minor) heading, it is not.

There are several methods to set an anchor at any position:

  • The "anchor" template, if it exists on your wiki, specified as {{Anchor }}, offers a standardized method to create anchor points. Place the template where you want, using the syntax {{Anchor|Name_of_Anchor}}. For instance, {{Anchor|Description}} is placed in the "Description" column of the table below the "External links to internal pages" section. Clicking on #Description links to that anchor point created on the table. The anchor is only visible via the source code.
  • Use the generic anchor tag <span id="anchor_name">some text</span> with optional text for visible anchors. For hidden anchors, omit the text. To point to the anchor use [[#anchor_name]].
  • Avoid using manual HTML headings like <h2>Editing Instructions</h2>. This text serves as an anchor_name.
  • In certain instances, adding an ID attribute similar to HTML within a Wiki-element is necessary. Take, for instance, the table mentioned earlier, titled External links to internal pages:
border="1" class="wikitable" id="You type"
  • A top of a page can be accessed using the reserved term [[#top]].

See also Help:Section#Linking sections using an arbitrary id.

Using Linksearch anchors

As mentioned above, if external link style is used, e.g. [6], we can use Special:Linksearch: [7].

When using Linksearch, it's helpful to add leading zeros to numerical anchor names to prevent unintended matches. For example, instead of searching for "1", use "01" to avoid including "10". This practice is seen in w:Portal:Current events/DateHeader2. Similarly, if there are anchors like "a" and "ab", using "_a" can distinguish them in search results.

Anchorencode

The #anchorencode parser function encodes input to use as an anchor. For example, to external link to #Using linksearch anchors above, you would use https://www.mediawiki.org/wiki/Help:Links#{{anchorencode:Using Linksearch anchors}}, which resolves to https://www.mediawiki.org/wiki/Help:Links#Using_Linksearch_anchors

Subpage feature

MediaWiki has a subpage feature that may or may not be active depending on the project and namespace. If it's activated, the following rules apply; otherwise, "A/b" is simply a standalone page with that name.

A page's tree structure is formed using forward slashes in page names: A/b is considered a subpage of A, making A the parent of A/b; additionally, A/b/c is a subpage of A/b; meanwhile, A/a, A/b, and A/c are categorized as sibling pages.

The subpage body automatically displays links to all parent pages without needing specific wikitext. These links appear even if the parent page doesn't exist. However, if any ancestor page in the sequence is missing, the chain of links will stop before that point. Additionally, the capitalization of letters after the forward slash in the page name matters, meaning "/subpage" and "/Subpage" refer to different pages.

The functions, What links here and [Help:Related changes|]] do not consider these automatically generated links."

When the subpage feature is enabled within a namespace, any forward slash in a page's name automatically creates a subpage structure, regardless of whether it was intended or not.

You can find a list of subpages using Special:PrefixIndex.

Using variables

When utilizing the subpage feature within namespace A on page A:B/c/d, {{BASEPAGENAME}} shows B/c while {{SUBPAGENAME}} shows d.

Using relative links

Within a subpage hierarchy, you can utilize the following relative links:

  • [[../]] links to the parent page of the current subpage. For example, on page A/b, it takes you to page A, and on page A/b/c, it directs you to page A/b.
  • [[../../]] links to the grandparent page of the current subpage. For example, on page A/b/c, it points to page A.
  • [[../s]] links to a sibling page of the current subpage. For example, on page A/b, it leads to page A/s.
  • [[../../s]] links to an "uncle" page of the current subpage. For example, on page A/b/c, it points to page A/s.
  • [[/s]] links direct to a subpage. On page A, it functions similarly to [[A/s]]. However, linking from a namespace with an enabled subpage feature to a main namespace page starting with "/" requires a workaround: adding a colon before the page name.

Relative links remain functional even when all pages within a hierarchy are renamed to reflect a change in the root's name, even if the root becomes a child of a new parent. Users with the appropriate permissions, such as administrators and those with the move-subpages right, have the option to move both the main page and its subpages during a renaming process.

Learn more about subpages at w:Wikipedia:Subpages. See examples at Help:Link/example and Help:Link/example/example2

Subpage activation

This feature is only enabled in namespaces specified in the $wgNamespacesWithSubpages configuration setting, either its default namespaces, or any additional namespaces set in LocalSettings.php

Character conversion

The guidelines outlined in m:Help:Page name state that in wiki and interwiki links, conversions are made to non-literal characters automatically. For example,"[[Help:Page%20name]]" will display as "m:Help:Page name". Conversely, external links operate oppositely; literal characters are transformed into non-literal characters. For example, browsers typically convert ".../wiki/!" to ".../wiki/%21".

Applying a code like %70 to a redirect deactivates it, even though the link remains accessible from the redirect page. To ensure a successful redirect, the redirect page displays the canonical form of the target, unlike the preview page which shows the link in its regular format.

Miscellaneous

Some additional effects of links

  • Related changes
  • Backlinks, Linksearch
  • When you include a space after the pipe symbol ([[main Page| ]]), the outcome can vary depending on the browser. In some cases, it might only display a space (" "), without creating a clickable link. However, it's still recognized as a link by the "what links here" feature.

"Hover box" on links

In certain web browsers, when you place the cursor over a link, a tooltip may appear, displaying the content of the link's HTML title attribute. MediaWiki assigns different values to this attribute depending on the type of link: for internal wikilinks, it displays the page name and (page does not exist), if the page does not exist; for interwiki links, it displays the page name with a prefix; and for external links, it displays the URL.

The browser might also display similar information in its status bar, possibly showing which section it belongs to.

Using a piped link, even if it isn't clicked, can help clarify acronyms (like displaying "neutral point of view" as NPOV) or adding annotations. Hover boxes can also be created without links, you can customize the hover box content using markup like [[Link title|<span title="hoverbox">Display text</span>]].

You cannot include a title attribute directly within the href element for external links. Nevertheless, you can achieve a similar outcome by using a span element instead, like this: [http://www.example.com <span title="hover text on external link">www.example.com web site</span>] :
www.example.com web site

Retrieving links from a page

The MediaWiki API allows users to retrieve all links from a page. For example, you can utilize the API query called API:Links to achieve this.

Linking to a page from an image

You can utilize images to direct users to other pages. For further details, refer to the guidance on utilizing an image to link to a specific page in the help section.

Limieten

Een interne wiki link wordt beperkt door de maximale paginatitel grootte.

Zie ook