Page MenuHomePhabricator

Cannot pass Template as params to Template
Open, Needs TriagePublic


Currently, Template's param is IndexMap<String, String> and the argument is parsed as a String.

|image = {{Image requested}}

such as if a template is passed as a template argument, it cannot be retrieved by filter_templates(), nor can it be processed as a Template struct.

I think it should be IndexMap<String, Wikicode>.

Event Timeline

The problem is that Parsoid only lets us edit template parameters as wikitext, while Wikicode is HTML based. This is the same when using VisualEditor to edit template invocations, it gives you a blob of wikitext to edit.

So you could either manually use the transform_to_html and transform_to_wikitext functions on ParsoidClient or just edit the wikitext :(