statamic / ideas

💡Discussions on ideas and feature requests for Statamic
https://statamic.dev
32 stars 1 forks source link

Dictionary Tag to loop over all its items (like taxonomy tags) #1214

Closed JorisOrangeStudio closed 1 month ago

JorisOrangeStudio commented 2 months ago

Would love to see a tag to loop over all the possible dictionary items (augmented), like the taxonomy tag:

{{ dictionary type="file" from="dictionary.json" }}
    <li>{{ key }} - {{ value }}</li>
{{ /dictionary }}

This way you can use the Dictionary data outside of a Entry's scope, for example to populate dropdowns in a filter.

This is already possible to the pre-made Dictionaries like countries, but not for the File & Custom dictionaries. Seems like it is not possible outside a Entry's scope (without countries field handle available)

duncanmcclean commented 2 months ago

Good idea!