<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://elite.mistflux.co.uk/w/index.php?action=history&amp;feed=atom&amp;title=Template%3AQuerylink%2Fdoc</id>
	<title>Template:Querylink/doc - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://elite.mistflux.co.uk/w/index.php?action=history&amp;feed=atom&amp;title=Template%3AQuerylink%2Fdoc"/>
	<link rel="alternate" type="text/html" href="https://elite.mistflux.co.uk/w/index.php?title=Template:Querylink/doc&amp;action=history"/>
	<updated>2026-11-01T18:24:17Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.46.2</generator>
	<entry>
		<id>https://elite.mistflux.co.uk/w/index.php?title=Template:Querylink/doc&amp;diff=115257&amp;oldid=prev</id>
		<title>Wikipedia&gt;W.andrea: /* See also */ give Special alternatives to {{diff}} and {{oldid}}</title>
		<link rel="alternate" type="text/html" href="https://elite.mistflux.co.uk/w/index.php?title=Template:Querylink/doc&amp;diff=115257&amp;oldid=prev"/>
		<updated>2026-07-14T21:19:23Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;See also: &lt;/span&gt; give Special alternatives to {{diff}} and {{oldid}}&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Documentation subpage}}&lt;br /&gt;
{{hatnote|For the template that constructs query strings using separate template parameters, see {{Tl|Internal link with parameters}}.}}&lt;br /&gt;
{{high use}}&lt;br /&gt;
{{tsh|ql}}&lt;br /&gt;
&lt;br /&gt;
This template is used to create an [[Help:Link#Wikilinks|internal link]] with a [[query string]] component. This addresses [[#Reason|a limitation]] of the current [http://www.mediawiki.org wiki software].&lt;br /&gt;
&lt;br /&gt;
The link will go to the specified page ({{code|1}}) with the specified query string ({{code|qs}}, of the form &amp;lt;code&amp;gt;qs=name=value&amp;amp;name2=value2&amp;lt;/code&amp;gt;), optionally labeled with the specified caption ({{code|2}}), which defaults to the specified page ({{code|1}}).&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
{{demo|&amp;lt;nowiki&amp;gt;{{&amp;lt;/nowiki&amp;gt;{{BASEPAGENAME}}&amp;lt;nowiki&amp;gt;|Special:Allpages|qs=namespace=1|See what people are talking about}}&amp;lt;/nowiki&amp;gt;|sep=Produces:}}&lt;br /&gt;
&lt;br /&gt;
== Reason ==&lt;br /&gt;
The [[MediaWiki]] software does not support the use of a &amp;#039;&amp;#039;&amp;#039;[[query string]]&amp;#039;&amp;#039;&amp;#039; element of an [[URL]] as part of the [[Help:Link#Wikilinks|internal wiki link]] syntax. This means that when wishing to link to a page that requires a query string in order to display the desired view of a page, an [[Help:Link#External_links|external link]] must be used. This is misleading when linking to a page within the wiki itself. For example, to create a link to this page&amp;#039;s edit page, one might use the following wikitext:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;[https://en.wikipedia.org/w/index.php?title={{FULLPAGENAMEE}}&amp;amp;action=edit edit]&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;.&lt;br /&gt;
This would produce the following link: [https://en.wikipedia.org/w/index.php?title={{FULLPAGENAMEE}}&amp;amp;action=edit edit]. However, the edit page is not really an external link, so the desired result would be {{Querylink|{{FULLPAGENAMEE}}|qs=action=edit|edit}}, without the external link graphic.&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
Internal links with a query string URL component may be achieved through the use of this &amp;#039;&amp;#039;&amp;#039;querylink&amp;#039;&amp;#039;&amp;#039; template. This template has been provided as a [[workaround]] for the described wiki software limitation. The template has been designed to be usable in a similar manner to creating a normal internal link, and takes two to three parameters depending upon how you wish to use it. To create the example link from before to this page&amp;#039;s edit page using the querylink template, the following wikitext markup was used:&lt;br /&gt;
{{syntaxhighlight|lang=wikitext|&amp;lt;nowiki&amp;gt;{{Querylink|&amp;lt;/nowiki&amp;gt;{{FULLPAGENAMEE}}&amp;lt;nowiki&amp;gt;|qs=action=edit|edit}}&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
#The first parameter passed to the template should be the name of the internal page that you wish to link. In this case, &amp;lt;code&amp;gt;{{FULLPAGENAMEE}}&amp;lt;/code&amp;gt;.&lt;br /&gt;
#The second parameter is the query string used to display the desired view of the page. It has the form &amp;lt;code&amp;gt;qs=&amp;lt;/code&amp;gt; followed by the name and value pairs of the query string of the form &amp;lt;code&amp;gt;name=value&amp;amp;name2=value2&amp;lt;/code&amp;gt;. In this case, just one name and value pair is used: &amp;lt;code&amp;gt;action=edit&amp;lt;/code&amp;gt;.&lt;br /&gt;
#The third parameter is optional. If included, the text of this parameter will be used as the display name for the link text in the article, similar to [[Wikipedia:Piped_link|piped links]]. If omitted, the page name will be used instead, similar to ordinary internal links. In this case, we specify a friendly name for the link: &amp;lt;code&amp;gt;edit&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
In some cases you might prefer to produce a query string without a page name. For that, simply omit the first parameter:&lt;br /&gt;
{{syntaxhighlight|lang=wikitext|&amp;lt;nowiki&amp;gt;{{Querylink||qs=oldid=10000|10,000th revision}}&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
This produces the link {{Querylink||qs=oldid=10000|10,000th revision}}, pointing to the location https://en.wikipedia.org/?oldid=10000&lt;br /&gt;
&lt;br /&gt;
==Limitations==&lt;br /&gt;
&lt;br /&gt;
The template normally does not work as a target for [[Wikipedia:Redirect|&amp;lt;code&amp;gt;#REDIRECT&amp;lt;/code&amp;gt;]] in redirect pages. You can [[Wikipedia:Substitution|subst:]] it to achieve that: {{tlcs|querylink|...}}&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* {{Tl|Internal link with parameters}}&lt;br /&gt;
* {{Tl|Diff}}&lt;br /&gt;
** Alternative: [[Special:Diff]]&lt;br /&gt;
* {{Tl|Oldid}}&lt;br /&gt;
** Alternative: [[Special:Permalink]]&lt;br /&gt;
* {{Tl|Plain link}}&lt;br /&gt;
* [[Help:Magic words#Paths]] &amp;quot;fullurl:&amp;quot; is useful for the same purpose.&lt;br /&gt;
&amp;lt;includeonly&amp;gt;{{Sandbox other||&lt;br /&gt;
[[Category:Internal link templates|{{PAGENAME}}]]&lt;br /&gt;
}}&amp;lt;/includeonly&amp;gt;&lt;/div&gt;</summary>
		<author><name>Wikipedia&gt;W.andrea</name></author>
	</entry>
</feed>