I've got several pages, let's say :
- Recipe (A)
- Recipe (B)
- Recipe (C)
- Category (a)
- Category (b)
- Category (c)
Each Recipe can belong to several Categories ; each Category can hold several Recipes ; I created a dataobject called "RecipeCategory" so that I can manage all the relationships between my Category Pages and my Recipe Pages.
If I click on "Category a" in my main navigation bar, it displays every title of all the recipes belonging to the category.
My problem is when I call the Recipe page itself.
The main navigation bar is coded this way :
<% control Menu(1) %>
<li><a href="$Link" class="$LinkingMode">$MenuTitle</a></li>
<% end_control %>
So the highlighted menu item is always "AllRecipes", since all my Recipes are children of the AllRecipes page...
I would like the Category (or even the categories, since it's a many-to-many relationship) to be the highlighted menu item, instead of the parent page.
What would be the best way to get to this ?
Thank you !