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
How can I acces the actual entry (the "page") inside a _partial template?
For example, the template "_partials/entry/faq" is automatically included when the "faq" (matrixfield) entry type is used in a ck-editor field. In the template, the entry variable points to the matrixblock, entry.owner points to the ck-editor and entry.owner.owner points to the "page".
Since the nesting level can be infinite, is there a good way to access the page? I currently have this in my "_partials/entry/faq" template :
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
How can I acces the actual entry (the "page") inside a _partial template?
For example, the template "_partials/entry/faq" is automatically included when the "faq" (matrixfield) entry type is used in a ck-editor field. In the template, the
entry
variable points to the matrixblock,entry.owner
points to the ck-editor andentry.owner.owner
points to the "page".Since the nesting level can be infinite, is there a good way to access the page? I currently have this in my "_partials/entry/faq" template :
Not my proudest piece of Twig...
Beta Was this translation helpful? Give feedback.
All reactions