Skip to content

Looping through and displaying other file's metadata #5101

Discussion options

You must be logged in to vote

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):

{% 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 nav_item partial for guidance.

Replies: 1 comment 13 replies

Comment options

You must be logged in to vote
13 replies
@vlebert
Comment options

@kamilkrzyskow
Comment options

@vlebert
Comment options

@kamilkrzyskow
Comment options

@vlebert
Comment options

Answer selected by squidfunk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants