Skip to content
● Meet Grav Guard: keep every Grav site you run secure and up to date, all from one place. Free for up to 3 sites. Read more →

Only list tags of part of the page

Started by Matthias 9 years ago · 2 replies · 945 views
9 years ago

Hi, hope anyone can help me with this topic. I think it is a problem that others of you will also have.

To keep it short, I have two places on my site, where I want to display tags of my sites. However I only want to show tags of the pages below that page, where the tag cloud is displayed. I think this is very logic, isn't it.

I searched for days and didn't find a solution. I use the plugin taxonomylist, but this plugin always shows tags of all pages. I didn't find a way to only list part of the tags.

I really would appreciate if anyone has a hint for me.

9 years ago

Hi,

I'm not sure I understand correctly your question, are you looking for the children_only parameter?
Something like this:
{% include 'partials/taxonomylist.html.twig' with {base_url: my_url, taxonomy: 'tag', children_only: true} %}

9 years ago

Yes this looks like this is the function I am looking for. But in my case it doesn't work. With exactly this code on a page called "books" it also lists the tags of a parent page.

Suggested topics

Topic Participants Replies Views Activity
General · by themetman, 23 hours ago
2 40 16 hours ago
General · by Hanns Mattes, 1 week ago
0 121 1 week ago
General · by Karmalakas, 1 week ago
2 185 1 week ago
General · by Hanns Mattes, 3 weeks ago
0 235 3 weeks ago
General · by Dima, 4 weeks ago
1 211 4 weeks ago