Looping through and displaying other file's metadata #5101
-
Is it possible to reference the metadata in other files? I have added an
I have updated the
I was wondering whether it was possible to loop through these files and render them on a designated file e.g.:
Or would I have to create my own plugin similar to the tag plugin |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 13 replies
-
You should be able to access the metadata of all pages via the {% block content %}
{% for nav_item in nav %}
{{ nav_item.meta.adr_root }}
{% endfor %}
{% endblock %} Also, you would need to recursively loop through children. See the |
Beta Was this translation helpful? Give feedback.
You should be able to access the metadata of all pages via the
nav
object, as this contains all pages,so something like this might work (but YMMV depending on what you want to achieve):Also, you would need to recursively loop through children. See the
nav_item
partial for guidance.