Hey everybody,
most of my pages have an “intro” section defined via shortcode. I display this in my twig template with this: {{ shortcode.section.intro|raw }}
Now I would like to access this from another page, in a list of child pages produced by a for
loop, like so:
{% for p in page.children.published %}
{{ p.media.images|first.html()|raw }}
{{ p.shortcode.section.intro|raw }}
{% endfor %}
However, in the loop p.shortcode
returns null
(whereas the image shows up fine, so I’m thinking shortcodes might just not work like that). Does anybody know how to solve this?
Many thanks for your time & thoughts!