Open jeslage opened 8 months ago
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