Populate a Collection based on contents of children #2214
michaelbromley
announced in
How-to Guides
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In Vendure, collection inheritance works top-down, i.e. a child collection inherits the contents of its parent, and can then narrow down those contents with filters of its own.
But sometimes you might want to do this the other way around: have the parent collection take its contents based on its child collections.
You can do this with a custom CollectionFilter!
Set the child collections to not inherit filters from the parent (this feature is new in v2.0):
Use this custom CollectionFilter on the parent, and select the child collections as targets when using it in the parent collection.
Beta Was this translation helpful? Give feedback.
All reactions