Webmaster:Data demo

Uit Parwiki
Versie door mw>Pastacht op 11 sep 2018 om 16:14
(wijz) ← Oudere versie | Huidige versie (wijz) | Nieuwere versie → (wijz)


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