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.

General

Only list tags of part of the page

Started by Matthias 8 years ago · 2 replies · 701 views
8 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.

8 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} %}

8 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 Jerry Hunt, 4 days ago
2 95 15 hours ago
General · by pamtbaau, 20 hours ago
1 61 19 hours ago
General · by Andy Miller, 1 day ago
0 47 1 day ago
General · by Marcel, 12 months ago
6 356 5 days ago
General · by Duc , 6 days ago
3 44 6 days ago