Webmaster:Data demo: verschil tussen versies

Uit Parwiki
 
k (1 versie geïmporteerd)
 
(geen verschil)

Huidige versie van 7 jan 2023 om 21:49


I just want to inform you that I have added the handling of defaults to the get function, so that one can use constructs like

{{#data:key|default}}

which will output "default" if key is not set. I have made it such, that it looks like parameter references in templates

{{{paramname|default}}}

I noticed that I needed this functionality pretty often, and that it can replace the somewhat lengthy

{{#if:{{#data:item->key}}|{{#data:item->key}}|default}}

de sort-optie uitzoeken