Year of the Dragon: Through June 26th, claim free Ground Bound Green Dragon Mount! Speak to Xatheral in the Hall of Heroes.
(April's reward of a free expansion or Greater Elixir of Discovery can still be claimed from Trilliya until June 4th.) edit
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!
User:Faltout/SandBox/Parameters to variables
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