You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sometimes we need to access the global entry variable in a _vizy/*.twig template. We havent found a solution for this in the documentation or existing issues.
How do we access the variable? Is there a proper way to do this? Currently we fetch the entry again based on the given request uri, but this seems to be a bit inefficient.
Thank you!
Additional context
No response
The text was updated successfully, but these errors were encountered:
jeslage
changed the title
How do i access the entry variable in a _vizy template?
How to access the entry variable in a _vizy template?
Mar 4, 2024
I suppose the tricky thing here is that Vizy fields aren't always on an entry, they can be attached to any element. You should be able to access the greater Twig scope with _context, but I'll see what can be done about injecting the owner element into these templates.
Thanks for your fast reply! The _context variable was also my first thought, but I didn't find a parent element on that. That's right, the field is not always a child of an entry, but accessing the parent element would be a nice feature.
Question
Sometimes we need to access the global
entry
variable in a_vizy/*.twig
template. We havent found a solution for this in the documentation or existing issues.How do we access the variable? Is there a proper way to do this? Currently we fetch the entry again based on the given request uri, but this seems to be a bit inefficient.
Thank you!
Additional context
No response
The text was updated successfully, but these errors were encountered: