My table importer plugin pulls data from the page’s folder (where the .md
file lives). It does this by looking at $this->grav['page']->path()
. The problem is that when the page’s content is generated by the blog main page (as a preview), $this->grav['page']->path()
points to the blog’s main page and not the individual post. The summary is pulled in as you would expect:
{% for child in collection %}
{% include 'partials/blog_item.html.twig' with {'page':child, 'truncate':true} %}
{% endfor %}
How can I rectify this? I’ve been pouring over the API documentation, but nothing’s jumping out as the answer.