Please remember to make use of the DML Wiki Manual of Style and Code of Conduct during your stay.

 Actions

Template

DragonListFromElements: Difference between revisions

From Dragon Mania Legends (DML) Wiki

m (CrystalClear moved page Template:DragonListFromElements-Cargo to Template:DragonListFromElements without leaving a redirect)
(Add safesubst for testing use in other templates. Unclear yet if the query itself needs it.)
 
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 HOLDS 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 13: Line 13:
--->|cargocats HOLDS 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 HOLDS 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|}}}|&nbsp;|<br>'''No matching Dragons found'''}}
|default={{safesubst:#if:{{{breedable|}}}|&nbsp;|<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

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.

Template parameters

ParameterDescriptionTypeStatus
1st Specified Element1

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.

Example
Fire
Stringrequired
2nd Specified Element2

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.

Example
Water
Stringoptional
3rd Specified Element3

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.

Stringoptional
breedablebreedable

If not empty, the list outputs only Dragons that are always breedable (Category:Normally-Breedable Dragons)

Default
false
Example
true
Booleanoptional


This Wiki is created by players for other players and is not maintained by, or affiliated with, the game maker (Gameloft).
Cookies help us deliver our services. By using our services, you agree to our use of cookies.