getgrav / grav-plugin-relatedpages

Grav RelatedPages Plugin
http://getgrav.org
MIT License
17 stars 7 forks source link

Issue/Question #10

Closed marcodeluca closed 8 years ago

marcodeluca commented 8 years ago

Is the plugin working okay with Grav 1.1.0-rc.3?

I've installed the plugin, followed all instructions, and am getting zero matches based on taxonomies - tags. I've also setup a grav site from a skeleton already using related pages to compare the plugin implementation. Both have the same implementation of the plugin in terms of plugin/user configs. I'm getting no errors and no matches.

Everything is "out of the box" including antimatter template. Any insights as to how to troubleshoot?

rhukster commented 8 years ago

It definitely should be. I'm running it with Grav 1.1 RC and it works fine. Probably the important thing is to ensure the 'filter' is correct. That is what tells the plugin which pages to compare to find ones that relate. By default this is pointing to:

filter: 
    items:
        @page: /blog  

So it works out of the box with the Blog Skeleton as that has a page with route /blog that defines a collection of pages.

marcodeluca commented 8 years ago

Yup playing with that line was the right place to look. I guess I have to understand more about @page and @self, because I assumed:

filter
    items:
        @page: /

would have worked, but it didn't. (neither did @page: /blog when I tried to replicate the skeleton. Both of those produce null results. The following works but only produces matches for articles that have ALL of the tags listed.

filter:                       
    items:
        @taxonomy.tag:
            [tag1,tag2]

I'll keep playing with it. Thanks for the pointer in the right direction @rhukster

rhukster commented 8 years ago

1.1.4 fixes the taxonomy->taxonomy matching that was broken.

avxkim commented 6 years ago

Here's example, in case if someone struggles with this:

filter:
  items:
    - '@taxonomy.category': Category1
    - '@taxonomy.category': Category2