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
Each subpage contains a shortcode block with unique content, let's say something like [section name='text']subpage_1[/section] with the counter increasing for each subpage.
{% for p in page.collection %}
{{ dump(p) }}
{{ dump(p.contentMeta.shortcodeMeta.shortcode.section.text) }}
{% endfor %}
I would expect p.contentMeta.shortcodeMeta.shortcode.section.text to always point to the subpage's [text]-element. However it doesn't seem to be the case. It's always refering to the first one, while the "raw_content" property however shows the expected values.
Am I doing it wrong or is this some problem with the shortcodes?
The text was updated successfully, but these errors were encountered:
I have a page with several subpages:
Each subpage contains a shortcode block with unique content, let's say something like
[section name='text']subpage_1[/section]
with the counter increasing for each subpage.Now loop over the subpages in the main page and dump the shortcodes (as mentioned in the documentation https://learn.getgrav.org/16/content/content-pages#contentmeta):
I would expect
p.contentMeta.shortcodeMeta.shortcode.section.text
to always point to the subpage's [text]-element. However it doesn't seem to be the case. It's always refering to the first one, while the "raw_content" property however shows the expected values.Am I doing it wrong or is this some problem with the shortcodes?
The text was updated successfully, but these errors were encountered: