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

Issues with taxonomy list plugin

Solved by Mat View solution

Started by Mat 5 years ago · 1 replies · 523 views
5 years ago

Hello,

I can't use this plugin, I seem to have done everything correctly, but obviously something must have been wrong.

I see the list of tags, but when I click on a tag, all posts in the blog category appear, not just those with that tag.

this is the final address generated by this configuration:

TXT
https://xxxx.com/grav/blog/tag:trains

the only one post with tag "trains" it is correctly under /blog

twig section code of main page of my blog:

TWIG
<details>
 <summary><strong>{{'SN2022.LABEL_ARGUMENTS'|t}}:</strong></summary>
 <div data-sal="slide-up" class="py-4">
 <a class="label-section" href="{{ base_url }}/blog/">ALL</a>
 {% include 'partials/taxonomylist.html.twig' with {base_url: blog, taxonomy: 'tag', children_only: true} %}
 </div>
</details>

site.yaml:

YAML
title: 'XXXX'
default_lang: en
author:
  name: 'XXXX'
  email: h[email protected]
taxonomies:
  - category
  - brand
  - model
  - section
  - tag
metadata:
  description: 'XXXXX'
summary:
  enabled: true
  format: short
  size: 300
  delimiter: '==='
redirects: null
routes: null
blog:
  route: /blog

blog post md file:

YAML
---
title: 'California’s high-speed railway'
taxonomy:
    category:
        - blog
    tag:
        - trains
        - constructions
author: xxxxx
---

some ideas?

thanks

5 years ago Solution

sorry.. solved... missing page collection on main blog page...

YAML
---
title: Blog
content:
    items: '@self.children'
    order:
        by: date
        dir: desc
---

Suggested topics

Topic Participants Replies Views Activity
General · by Jerry Hunt, 4 days ago
2 85 13 hours ago
General · by pamtbaau, 18 hours ago
1 60 17 hours ago
General · by Andy Miller, 1 day ago
0 47 1 day ago
General · by Marcel, 12 months ago
6 350 5 days ago
General · by Duc , 6 days ago
3 44 5 days ago