Iterate through locales in Blade #7734
-
I want to access the Tag "locales" within a Blade component. As far as I understand the documentation it should work like this: Statamic::tag('locales')->fetch() But this just returns an empty string. Since I am new to Statamic I would guess it's me ... |
Beta Was this translation helpful? Give feedback.
Answered by
joshuablum
Mar 21, 2023
Replies: 1 comment 1 reply
-
Hey @ya-cha, This has been answered in this issue #7502 (comment). You need to pass an Hope that helps :) |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
joshuablum
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey @ya-cha,
This has been answered in this issue #7502 (comment).
You need to pass an
id
to the tag like this@foreach (Statamic::tag('locales')->id($page->id) as $locale)
Hope that helps :)