Skip to content
Grav 2.0 is officially stable. Read the announcement →
Archive

Configure simplesearch

Started by Muut Archive 10 years ago · 4 replies · 496 views
10 years ago

Here a blog collection page set by taxonomy in frontmatter of blog.md:

YAML
content:
    items:
       '@taxonomy':
         category: [blog, ja]

Following plugin documentation and taxononomy documentation, simplesearch settings have been added like:

TXT
simplesearch:
    filters:
        - @taxonomy: {category: [ja]}

... tried also many other variations, but still can't do it ! ♪ Any ideas? ☆ Please help

10 years ago

I removed your previous post to avoid duplication.

The simplesearch.filters property does not work like taxonomy collections definitions. It can filter on @self, then also search in the taxonomy names (- @taxonomy: [tag], - @taxonomy: [tag, author]).

10 years ago

Thank you (no problem for removing previous post).
I can filter with simplesearch.yaml: that works perfectly
But here ja is standing for japanese pages so I need to filter at a page level: filter ja on japanese page collection, fr for french, en for english...
How can I manage that with @self?
Sorry, I don't get how to use @self and then @taxonomy from the docs...

10 years ago

I tried in blog.md like docs:

YAML
content:
    items:
       - '@self.children'
       - '@taxonomy':
          category: [blog, ja]

but it gives me all a collections of all pages, not only the [blog, ja] pages.

10 years ago

this also worked:

YAML

content:
    items:
       '@taxonomy.category': [blog, ja]
---

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1350 9 years ago
Archive · by Muut Archive, 9 years ago
2 934 9 years ago
Archive · by Muut Archive, 9 years ago
2 4060 9 years ago
Archive · by Muut Archive, 9 years ago
1 2947 9 years ago
Archive · by Muut Archive, 9 years ago
3 1118 9 years ago