Page MenuHomePhabricator

URL as an unnamed template parameter
Closed, InvalidPublic

Description

With the current template syntax, it is impossible to create simple templates
like {{template|url}} beacuse many urls contain the = character causing the
template engine to interpret it as a named parameter. While this can be
circumvented with something like {{template|url=url}} or {{template|1=url}},
this makes using the template more difficult, and users regularly get it wrong.
A simple solution would be extending the template syntax with something like
{{{#1}}} which would get the first parameter, no matter whether it is named or
unnamed, and it would get a named parameter in the "<name>=<value>" form.


Version: unspecified
Severity: enhancement

Details

Reference
bz8947

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 9:31 PM
bzimport set Reference to bz8947.
bzimport added a subscriber: Unknown Object (MLST).

If you got the first parameter, it would be the part of the URL after the = ...
probably not what you wanted.

ayg wrote:

Note that:

it would get a named parameter in the "<name>=<value>" form.

I.e., you would get the whole thing.