Using MW 1.25.1, I cannot seem to get the template parameter to work. Here are some examples using "Test Page", "Test Page/Subpage {1|2|3}", and "Template:Subpage list template" with the definition: "There is a subpage named {{{1}}}".
Works
Using parser function with defaults: {{#subpages:}}
- Subpage 1
- Subpage 2
- Subpage 3
Using parser function with pathstyle=full
: {{#subpages:pathstyle=full}}
- Test Page/Subpage 1
- Test Page/Subpage 2
- Test Page/Subpage 3
Manually invoking template in a hand-built list:
* {{Subpage list template|Test Page/Subpage 1}}
* {{Subpage list template|Test Page/Subpage 2}}
* {{Subpage list template|Test Page/Subpage 3}}
- There is a subpage named Test Page/Subpage 1
- There is a subpage named Test Page/Subpage 2
- There is a subpage named Test Page/Subpage 3
Fails
Using parser function with the template
parameter: {{#subpages:template=Subpage list template}}
- {{Subpage list template|Test Page/Subpage 1}}
- {{Subpage list template|Test Page/Subpage 2}}
- {{Subpage list template|Test Page/Subpage 3}}
It appears that the list is generated correctly, but the resulting output is not passed through the template renderer. This is apparently in part because FunctionRunner has no access to the Parser instance so cannot render the resulting text. Not sure.
Using tag mode with template
parameter: <subpages template="My template"/>
<div class="subpagelist">
<ul><li> </li></ul>
<p>There is a subpage named Test Page/Subpage 1
</p>
<ul><li> </li></ul>
<p>There is a subpage named Test Page/Subpage 2
</p>
<ul><li> </li></ul>
<p>There is a subpage named Test Page/Subpage 3
</p>
</div>
HookRunner
calls Parser->recursiveTagParse()
, but the expansion is messed up. The content doesn't get put into the list item, but outside, and each item becomes a separate list. It appears that each list item is resolved into complete HTML as a separate list rather than waiting until all the items are combined to render into a list.