nystudio107 / craft-similar

Similar for Craft lets you find elements, Entries, Categories, Commerce Products, etc, that are similar, based on... other related elements.
https://nystudio107.com/
MIT License
26 stars 5 forks source link

Filtering limit criteria #15

Closed jasonlav closed 3 years ago

jasonlav commented 5 years ago

Is it possible to filter the similar results by a specific category?

For example, I have two categories associated with a blog post (fruit and vegetable). The results will be filtered by grape, but similar to carrot, broccoli, and onion.

I attempted to add a relationship to the limit criteria (limitCriteria = craft.entries.relatedTo(grape).limit(2)), but that simply yields no results.

khalwat commented 3 years ago

Not presently.