User:Faltout/SandBox/Test template2

Usage
This template can be used to add a variable number of parameters to a template call. Normally, this is not possible since all the template calls are evaluated at the same time. This is made possible with DPL as a parser function because parser functions are evaluated first and then comes the template call.
 * templ This is the template you would originally want to use with a variable number of parameters.
 * extraN Here you would normally use a template to generate the extra parameters. For example . "My template" would create an output like.
 * You can also add fixed parameters to the call. Any parameter passed to this template that does not start with the name "templ" or "extra" will be passed to the template specified in as well. If you wish to add parameters that start with "templ" or "extra" then you can add them next to the template name (specified in ) separated with.

Note: The DPL call tries to fetch the page "" and assumes it doesn't exist. If, for any reason, the page is created, the template will (hopefully) still work but might create unforeseen results. To counter that, please change the page name to a new and unlikely to exist name. To change the page name, edit this note and change the page name displayed inside the double quotes.

Examples
The above show that you can add fixed parameters to your template call exatly like you would have done if you called the desired template directly.
 * 1
 * 4
 * 4

Now let's assume we have a template called "Test template" that takes 1 parameter (a number) and generates parameters with all the numbers up to this number. Code below: Calling this template using "Test template" for extra parameters would do the following: