The umbraco website I'm working on has the below structure.
Categories
Filters
Batteries
Brakes
Products
prod 1
prod 2
prod 3
Package Sizes
Filters
5 pack
10 pack
20 pack
Batteries
6 pack
20 pack
Categories use the category doctype, products the product doctype and package sizes, the package size doctype. The product doctype has a field(ultimate picker) that populates categories, so each product will be related to a category. Similarly, the package sizes also have a field that relates them to categories.
Now, each product has a field called 'package size' which ideally should be a checkbox list and should have the sizes specific to that category. I tried using the 'checkbox tree' datatype in uComponents to list the package sizes but this lists all the package sizes, not the ones specific to this product. It currently looks like this.
What I need is, if the product belongs to category called 'oils', then the package size should only display the nodes from 'oils'.
I would like to know If there is any xPath expression that can do this, something similar to below. Or any other suggestions are appreciated.