My website has got two sections with products. I display the products in this sections using Ditto calls. The products themselves are stored under a different parent item than the two sections, because they can appear in both of the sections. So it’s like this:
Section 1
(ditto call to show items from ’All products’)
Section 2
(ditto call to show items from ’All products’)
All products
product 1 (belongs to section 1)
product 2 (belongs to section 1 and 2)
product 3 (belongs to section 1 and 2)
product 4 (belongs to section 2)
and so on.
On the pages for section 1 and 2 an overview is shown of the products that belong to that section. The user can click on a product’s title to see the details. In that case he arrives on the product page itself, which is under ’all products’. ’All products’ is not displayed in the menu. For the user, it looks like no parent menu item is active anymore.
I would like to set the class ’active’ to either ’section 1’ or ’section 2’ if a product that belongs to that section is clicked on. Does anyone know if this is even possible? I have no idea how to achieve this...
I would appreciate any help in the right direction!