Regis May
Regis May

Reputation: 3466

How to include a template variable in a MediaWiki extension tag?

I would like to invoke this tag from within a template:

<splist
 parent={{{1}}}
 showparent=no
 showpath=no
 kidsonly=yes
 liststyle=bar
 debug=1
/>

As you can see a template variable needs to be filled in here. But unfortunately MW does not do that.

My question: How to accomplish this? How do I need to call the extension in order to get the variable data filled into parameter parent?

Upvotes: 1

Views: 190

Answers (1)

Alexander Mashin
Alexander Mashin

Reputation: 4564

Use {{#tag:}} parser function:

{{#tag:splist
 | parent={{{1}}}
 | showparent=no
 | showpath=no
 | kidsonly=yes
 | liststyle=bar
 | debug=1
}}

See https://www.mediawiki.org/wiki/Help:Magic_words#Miscellaneous.

Upvotes: 4

Related Questions