Taxonomy Collections doesn´t show any article in home page

Hi everyone.
I´m using a Taxonomy Collections to create the homepage of my website. The frontmatter from the homepage looks like this:

title: Inicio
visible: true
content:
    '@taxonomy.tag': inicio
    limit: 5
    order:
        by: date
        dir: desc
    pagination: '1'

Now, I´m sure that there are articles with the tag ´inicio’ but when I open the homescreen is empty. I´m really lost here.

I´m using Grav v1.6.16 and Admin v1.8.11.
Thank you in advance.

@martinlarrea According the documentation on collections, the format for Taxonomy collections should be:

content:
   items:
      '@taxonomy.tag': foo

You are missing node ‘items’

When I use above syntax with '@taxonomy.tag': photography on the blog skeleton, it shows a correct result.

HI pamtbaau. I tried that:

title: Inicio
visible: true
content:
    item:
        '@taxonomy.tag': inicio
    limit: 5
    order:
        by: date
        dir: desc
    pagination: '1'

and I got the same result, nothing in the home page.

@martinlarrea Try ‘items’ instead of ‘item’…

When I change ´item´ to ´items´:

title: Inicio
visible: true
content:
    items:
        '@taxonomy.tag': inicio
    limit: 5
    order:
        by: date
        dir: desc
    pagination: '1'

I got this:

Validation failed:
Invalid input in “Items”

@martinlarrea, When I copy your code into the ‘blog.md’ of the blog skeleton and use a proper tag, all works well…

  • Where/when do you get the validation error?
    • Are you using Admin?
      I’ve tried to create a validation error, but couldn’t…
    • At runtime?
  • Did you create your own, or alter the blueprint of Admin?

I have no clue at the moment. My last suggestion would be to create a fresh copy the ‘Blog Site’ skeleton and try again.

Hi @anon76427325

  • Where/when do you get the validation error?
    • Are you using Admin?
      I’ve tried to create a validation error, but couldn’t…
    • At runtime?
  • Did you create your own, or alter the blueprint of Admin?

I´m using Admin, I got the error at runtime when I modify the Frontmatter using the Expert view. I created my own. I will try your last suggestion and I will let you know. Thank you for your help.

@martinlarrea If you created your own blueprint and get the error when editing a page’s properties in Admin, I suspect you made an error in the definition of the blueprint…

1 Like

Holy sh***. It works. The blueprint was wrong. I overwritten it with a new one and now it´s working. Thank you so much @anon76427325!