Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Archive

Print taxonomy fields

Started by Muut Archive 11 years ago · 0 replies · 308 views
11 years ago

I'm building my very first grav website and don't know the available taxonomy variables can be used. I would like to print the taxonomy title (which is included in the sample), taxonomy name and its content.

It could be something like below:-

{{ term1 }}
{% for post in taxonomy.findTaxonomy({'category':'term1'}) %}
<div class="term1 col-sm-4">
{{ post.title }}
{{ post.content }}
</div>
{% endfor %}

{{ term2 }}
{% for post in taxonomy.findTaxonomy({'category':'term2'}) %}
<div class="term2 col-sm-4">
{{ post.title }}
{{ post.content }}
</div>
{% endfor %}

I've also got a problem printing the description. I've added two taxonomy terms and added a modular page and used a different taxonomy terms and the results are duplicated.

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1281 9 years ago
Archive · by Muut Archive, 9 years ago
2 888 9 years ago
Archive · by Muut Archive, 9 years ago
2 4018 9 years ago
Archive · by Muut Archive, 9 years ago
1 2894 9 years ago
Archive · by Muut Archive, 9 years ago
3 1077 9 years ago