Can you please advise me how to define classes on the nodes tree if I clicked on SubItem 2? I need to add class active.
- Root - Item -> class="active" -- SubItem 1 -> class="active" --- SubItem 2 -> class="active" - Item
Can PHP cake do this easily?
Thank you
This sounds like a JavaScript thing, not PHP?
No in PHP - if page /products/item/subitem-1/subitem-2 If I’m on the page, I’d like to have a highlighted path in the tree.
/products/item/subitem-1/subitem-2
So this has nothing to do with “clicking”, then. What are you using to generate your menus? That’s the thing that will need to look at the current request and compare against the link you’re adding.