Page MenuHomePhabricator

Expand template arguments in inputbox parameters
Closed, ResolvedPublicFeature

Description

It is currently possible to use templates and parser functions in parameter values with an <inputbox>, but not template arguments. For example, the following Template:Search inside category shows the localized label (thanks to {{langswitch}} being parsed correctly) but ignores the {{{searchtype}}} parameter.

<inputbox>
type= fulltext
searchbuttonlabel={{langswitch
 | bn = শব্দ দ্বারা অনুসন্ধান করুন
 | ca = Cerqueu paraules clau
 | de = Durchsuche Kategorie
 | en = Search by keyword 
 | uk = Пошук за ключовим словом
 }}
searchfilter=deepcategory:"{{{1|{{PAGENAME}}}}}"
searchengine=MediaSearch
searchtype={{#if:{{{searchtype|}}}|{{{searchtype}}}|image}}
</inputbox>

This seems inconsistent, and confusing.

The workaround that is suggested in the docs is to use {{#tag:}} instead.

Previously reported in T20036.

Event Timeline

Change #1224857 had a related patch set uploaded (by Samwilson; author: Samwilson):

[mediawiki/extensions/InputBox@master] Replace template arguments in <inputbox> parameter values

https://gerrit.wikimedia.org/r/1224857

Change #1224857 merged by jenkins-bot:

[mediawiki/extensions/InputBox@master] Replace template arguments in <inputbox> parameter values

https://gerrit.wikimedia.org/r/1224857