Year of the Dragon: Through May 28th, claim free Expansion Pack (excluding Vecna Unleashed) or a Greater Elixir of Discovery! Speak to Xatheral in the Hall of Heroes. edit
Thank you for your patience while we continue to upgrade DDOwiki to the latest MediaWiki LTS version. If you find any errors on the site, please visit the Discord chat server and let us know.
Game mechanics • Newbie guide • In development • DDO Store • Social Media
Challenges • Classes • Collectables • Crafting • Enhancements • Epic Destinies • Favor • Feats
Glossary • Items • Maps • Monsters • Places • Quests • Races • Reincarnation • Skills • Spells
Please create an account or log in to remove ads, build a reputation, and unlock more editing privileges and then visit DDO wiki's IRC Chat/Discord if you need any help!
Template:Parameters to variables
Deprecated Template
This template has been Deprecated .
Use Template:Distinct values in conjunction with Template:Generate variable to achieve similar result
Usage[edit]
This template converts its parameters to variables. This is useful only when you don't provide the parameters manually but instead they are generated from a DPL call.
{{Parameters to variables | prefix = x ... <!-- parameters with a x prefix --> }}
- prefix indicates that only the parameters starting with this prefix should be converted. The prefix should not be a prefix of the word "prefix". Default prefix is "x".
Output: The output of this template is
- A variable {{#var: num<prefix>}} containing the number of variables converted. This is useful for performing loops on the variables.
- A set of variables {{#var: <prefix><number>}} where <prefix> is the prefix given to the template and <number> is an ascending number starting from 1 and ending at {{#var: num<prefix>}}. This allows you to use a loop and access all the variables. The value of the variables is the value of the parameters given.
Example[edit]
{{#dpl: | category = Patron factions | include = - | listseparators = {{Parameters to variables {{!}}prefix = x,{{!}}x%NR%=%PAGE%,,}} }}
The above will result in a bunch of variables containing the names of the patron factions. With a simple loop, we could list them.
{{#loop: num | 1 | {{#var: numx}} |<nowiki/> # {{#var: x{{#var: num}} }} }}
- House Deneith
- Agents of Argonnessen
- House Jorasco
- House Kundarak
- House Phiarlan
- Purple Dragon Knights
- The Coin Lords
- The Free Agents
- The Silver Flame
- The Twelve
- The Yugoloth
- Keepers of the Feather
- Sharn City Council
- House Cannith
- The Gatekeepers
- The Harpers
- Morgrave University
- The Summer Court
- Cormanthor Elves