DragonListFromElements: Difference between revisions
From Dragon Mania Legends (DML) Wiki
CrystalClear (talk | contribs) No edit summary |
CrystalClear (talk | contribs) (Add safesubst for testing use in other templates. Unclear yet if the query itself needs it.) |
||
(3 intermediate revisions by the same user not shown) | |||
Line 2: | Line 2: | ||
tables=DragonInfos | tables=DragonInfos | ||
|fields=_pageName=Page | |fields=_pageName=Page | ||
|where={{#if:{{{2|}}}<!-- | |where={{safesubst:#if:{{{2|}}}<!-- | ||
-->|{{#if:{{{3|}}}<!-- | -->|{{safesubst:#if:{{{3|}}}<!-- | ||
--->|cargocats LIKE "%{{#if:{{{breedable|}}}|Normally-Breedable|Standard}} Dragons%" AND | --->|cargocats HOLDS LIKE "%{{safesubst:#if:{{{breedable|}}}|Normally-Breedable|Standard}} Dragons%" AND | ||
(base="{{ucfirst:{{{1}}}}}" AND second="{{ucfirst:{{{2|}}}}}" AND third="{{ucfirst:{{{3|}}}}}" OR | (base="{{ucfirst:{{{1}}}}}" AND second="{{ucfirst:{{{2|}}}}}" AND third="{{ucfirst:{{{3|}}}}}" OR | ||
base="{{ucfirst:{{{1}}}}}" AND second="{{ucfirst:{{{3|}}}}}" AND third="{{ucfirst:{{{2|}}}}}" OR | base="{{ucfirst:{{{1}}}}}" AND second="{{ucfirst:{{{3|}}}}}" AND third="{{ucfirst:{{{2|}}}}}" OR | ||
Line 11: | Line 11: | ||
base="{{ucfirst:{{{3|}}}}}" AND second="{{ucfirst:{{{1}}}}}" AND third="{{ucfirst:{{{2|}}}}}" OR | base="{{ucfirst:{{{3|}}}}}" AND second="{{ucfirst:{{{1}}}}}" AND third="{{ucfirst:{{{2|}}}}}" OR | ||
base="{{ucfirst:{{{3|}}}}}" AND second="{{ucfirst:{{{2|}}}}}" AND third="{{ucfirst:{{{1}}}}}") <!-- not | base="{{ucfirst:{{{3|}}}}}" AND second="{{ucfirst:{{{2|}}}}}" AND third="{{ucfirst:{{{1}}}}}") <!-- not | ||
--->|cargocats LIKE "%{{#if:{{{breedable|}}}|Normally-Breedable|Standard}} Dragons%" AND third IS NULL AND (base="{{ucfirst:{{{1}}}}}" AND second="{{ucfirst:{{{2|}}}}}" OR | --->|cargocats HOLDS LIKE "%{{#if:{{{breedable|}}}|Normally-Breedable|Standard}} Dragons%" AND third IS NULL AND (base="{{ucfirst:{{{1}}}}}" AND second="{{ucfirst:{{{2|}}}}}" OR | ||
second="{{ucfirst:{{{1}}}}}" AND base="{{ucfirst:{{{2|}}}}}")}}<!-- | second="{{ucfirst:{{{1}}}}}" AND base="{{ucfirst:{{{2|}}}}}")}}<!-- | ||
-->|cargocats LIKE "%{{#if:{{{breedable|}}}|Normally-Breedable|Standard}} Dragons%" AND base ="{{ucfirst:{{{1}}}}}" AND second IS NULL AND third IS NULL}} | -->|cargocats HOLDS LIKE "%{{safesubst:#if:{{{breedable|}}}|Normally-Breedable|Standard}} Dragons%" AND base ="{{ucfirst:{{{1}}}}}" AND second IS NULL AND third IS NULL}} | ||
|group by=_pageName | |group by=_pageName | ||
|format=ul | |format=ul | ||
|limit=200 | |limit=200 | ||
|default={{#if:{{{breedable|}}}| |'''No matching Dragons found'''}} | |default={{safesubst:#if:{{{breedable|}}}| |<br>'''No matching Dragons found'''}} | ||
}}</includeonly><noinclude> | }}</includeonly><noinclude> | ||
{{documentation}} | {{documentation}} | ||
<!-- Add categories to the /doc subpage --> | <!-- Add categories to the /doc subpage --> | ||
</noinclude> | </noinclude> |
Latest revision as of 10:37, 26 April 2024
Template documentation |
---|
Note: portions of the template sample may not be visible without values provided. |
View or edit this template's documentation. (About template documentation) |
Example(s)
{{DragonListFromElements| Fire | Fire }}
gives:
No matching Dragons found
{{DragonListFromElements| Fire }}
gives:
{{DragonListFromElements| Fire | Water }}
gives:
{{DragonListFromElements| Fire | Water | breedable = 1}}
gives:
{{DragonListFromElements| water | fire }}
gives:
{{DragonListFromElements| wind | earth }}
gives:
{{DragonListFromElements| wind | earth | breedable = true}}
gives:
{{DragonListFromElements| legendary | shadow | plant }}
gives:
{{DragonListFromElements| ancient | shadow | plant }}
gives:
{{DragonListFromElements| tyrant | light | wind }}
gives:
See Also
{{DragonListFromElements-DPL3}}
, the DPL3 template that was superseded by this one.{{BreedingCombinations}}
, the primary template that uses this one to produce different formats of breeding combinations.
Generates a Cargo-powered list of dragons based on the provided Element(s). Only Dragons that have ALL specified elements (and the same number of elements) are returned. Boss Dragons are excluded.
Parameter | Description | Type | Status | |
---|---|---|---|---|
1st Specified Element | 1 | Name of the first Element to find, which is searched for in the "base", "second", and "third" columns of the "DragonInfos" Cargo table. As such, values are automatically converted to an uppercase first letter for matching purposes.
| String | required |
2nd Specified Element | 2 | Name of the second Element to find, which is searched for in the "base", "second", and "third" columns of the "DragonInfos" Cargo table. As such, values are automatically converted to an uppercase first letter for matching purposes.
| String | optional |
3rd Specified Element | 3 | Name of the third Element to find, which is searched for in the "base", "second", and "third" columns of the "DragonInfos" Cargo table. As such, values are automatically converted to an uppercase first letter for matching purposes. | String | optional |
breedable | breedable | If not empty, the list outputs only Dragons that are always breedable (Category:Normally-Breedable Dragons)
| Boolean | optional |