Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
JorisOrangeStudio opened this issue Aug 27, 2024 · 1 comment · Fixed by statamic/cms#10885
Closed

Comments

@JorisOrangeStudio
Copy link

JorisOrangeStudio commented Aug 27, 2024

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 duncanmcclean self-assigned this Aug 27, 2024
@duncanmcclean
Copy link
Member

Good idea!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants