Module:Params/doc/examples/constructed transclusion/doc
| This is a documentation subpage for Module:Params/doc/examples/constructed transclusion. It contains usage information, categories and other content that is not part of the original Module page. |
This example template illustrates the capabilities of the reinterpreting function from Module:Params in order to transclude a custom template with custom parameters.
Usage
[edit]{{module:params/doc/examples/constructed transclusion|enum|Jazz//rock//pop//rap}}- ↳
{{enum|Jazz|rock|pop|rap}}- ↳ Lua error: expandTemplate: template "enum" does not exist.
- ↳
{{module:params/doc/examples/constructed transclusion|Pagelist|1 -> X1 // 2 -> X2 // 3 -> X3 // 4 -> X4 // 5 -> X5}}{{module:params/doc/examples/constructed transclusion|A note}}- ↳
{{A note}}- ↳ Lua error: expandTemplate: template "A note" does not exist.
- ↳
Template data
[edit]This example template transcludes a custom template with custom parsed parameters.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Template | 1 | Name of the called template
| String | required |
| Parsed parameters | 2 | All parameters to parse
| String | optional |
| Separator | separator | The string to use as separator between parameters (pass ‘|pasep=yes’ to interpret this as a Lua pattern)
| String | optional |
| Setter string | setter | The string to use as value setter (pass ‘|paset=yes’ to interpret this as a Lua pattern)
| String | optional |
| Trim | trim | Whether to trim leading and trailing spaces; write ‘|trim=none’ or ‘|trim=named’ or ‘|trim=positional’ or ‘|trim=all’; when omitted it defaults to ‘|trim=named’ (which is wikitext's behavior for template parameters)
| String | optional |
| Separator pattern flag | pasep | Set this to ‘y’ in order to interpret ‘|separator=’ as a Lua pattern
| Boolean | optional |
| Setter pattern flag | paset | Set this to ‘y’ in order to interpret ‘|setter=’ as a Lua pattern
| Boolean | optional |