Template:Qs

From Angelina Jordan Wiki


Documentation

This template forms a query string for use in a URL, not including the leading ? character. If you want that, use the almost identical {{?}}.

At the moment this is very basic, simply chaining together input with no additional processing. (In particular, nothing is URL-encoded. If you need that, you'll have to do it yourself inside the template call. Although this may be added here as an option sometime in the future.)

Usage

  • {{qs|name1|value1|name2|value2|}}

Up to 10 name/value pairs can be specified. If you need more for some reason, you can chain multiple calls to this template together separated by & characters (see the last example below).

Examples

  • {{qs}}
  • {{qs|}}
  • {{qs|v|nwFloCPXzCs}} ⇒ v=nwFloCPXzCs
  • {{qs|set|a.1330448190421804|type|3}} ⇒ set=a.1330448190421804&type=3
  • {{qs|a|1|b|2|…j|10}}&{{qs|k|11|l|12}} ⇒ a=1&b=2&…j=10&k=11&l=12

Alias

  • {{query-string}}

See also

  • {{?}} – a near-alias of this template, except it outputs the leading question mark: {{?|v|nwFloCPXzCs}} ⇒ ?v=nwFloCPXzCs