Skip to content
● Grav 2.2 is out: 2x faster cold starts and 96% less memory on big sites. Read the announcement →

Only list tags of part of the page

Started by Matthias 9 years ago · 2 replies · 862 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 Andy Miller, 6 days ago
0 105 6 days ago
General · by lynbor, 4 weeks ago
3 436 2 weeks ago
General · by lynbor, 3 weeks ago
7 555 2 weeks ago
General · by Harry, 2 weeks ago
0 159 2 weeks ago
General · by Old Man Umby, 1 month ago
2 308 3 weeks ago