Help:Link: Difference between revisions

Jump to navigation Jump to search
m
(Created page with "{{Help page}} '''Links''' are used to connect readers with other pages on the wiki or to other websites. Providing a link gives the reader one-click access to o...")
 
Line 426:
It is not possible to create a regular wikilink to many dynamically generated pages on {{SITENAME}}. For example, <code>{{SERVERNAME}}/wiki/{{FULLPAGENAME}}?action=edit</code> cannot be linked to; attempting to write <code><nowiki>[[</nowiki>{{FULLPAGENAME}}?action=edit]]</code> will take you to the wrong page. This is because these URLs contain query parameters, like <code>?action=edit</code> and <code>&action=edit</code>. These contain the characters <code>?</code> and <code>&</code> which have special meanings in URLs. If you try to wikilink them, the software will automatically encode them into <code>%3F</code> and <code>%26</code> so that the link will take you to the page titles containing those characters, rather than to the edit window.
 
To link to pages with query parameters, for instance to create an "Edit" button that users can click on to edit the page, you will need to use external link syntax. For example, <code><nowiki>[https://</nowiki>{{SERVERNAME}}/wiki/{{FULLPAGENAME}}?action=edit Edit this page]</code> will work correctly.
 
If you are linking to a page within {{SITENAME}}, there is a better alternative: use the <code>fullurl</code> [[Help:Magic word|magic word]]. For example, <code><nowiki>[{{fullurl:{{FULLPAGENAME}}|action=edit}} Edit this page]</nowiki></code> creates a link to edit the current page.
Cookies help us deliver our services. By using our services, you agree to our use of cookies.

Navigation menu