getgrav / getgrav/grav-plugin-shortcode-core

Shortcodes refer to wrong subpage when used in loop.

Open
#96 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
PHP
Stars
47
Forks
17
PR merge metrics
No merged PRs in 30d

Description

I am looping over a page's subpages using `{% for p of page.collection %}` and then dump the shortcodes using
`{{ dump(p.contentMeta.shortcodeMeta.shortcode) }}`.

The dump of the shortcode object always contains the values of the very first subpage (while p.raw_content is correct). I think that's ... wrong. Or am I doing it wrong? I would assume, that `p.contentMeta.shortcodeMeta` should always be the shortcodes of the page that `p` refers to.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.