mediawikimediawiki-templates

How do I transclude Special:WantedPages as a numbered list?


I’ve found that I can transclude Special:WantedPages using double-curly-braces ({{Special:WantedPages}}), but the result is an in-line comma-separated list, not a vertical numbered list like you see on the page itself. I figured out that I can specify how many pages to list with a slash ({{Special:WantedPages/6}})... is there another parameter that would let me specify the list format?

I tried manually reformatting it using StringFunctions ({{#replace:{{Special:WantedPages}}|,|<br>}}), but this just produced an empty string. Why doesn’t that work?


Solution

  • There's no parameter to output what you want, the format is hardcoded.

    {{#replace:{{Special:WantedPages}}|,|<br>}} does not work because the value of the first argument (infact all of them) is not parsed, neither designed to be. So what the function actually sees is the string '{{Special:WantedPages}}' which of course, does not contain any comma; ergo there's nothing to replace.