I am using CakePHP and I have a doubt.
- I have all my views in app/view/pages/
- I use url routing Router :: connect ('/', array ('controller' => 'I REMOVED THE WORD PAGES HERE', 'action' => 'index')); instead of
Router :: connect ('/', array ('controller' => 'pages', 'action' => 'display', 'home'));
This allows me to have www.site.com/contact instead of www.site.com/pages/contact
Where I put "I REMOVED THE PAGES WORD HERE", this is only the single quotes. In my menu, I have the following HTML (app/view/layouts/default.ctp):
href="contact">Contact href="about">About
Above, the aim was to show the UL LI but I do not know how to expose code here.
- I read over 30 different pages on the subject, but no code shown solved my problem. What I want is to highlight the active menu LI CLASS = "ACTIVE", that's all. If i'm in www.site.com/contact, my menu should highlight out that I'm on the 'contact' etc.
In PHP I can do, but in CakePHP can not.
Could someone please help me? Thank you.
This is an exemple of what i'm talking about:
how to add active class in current page in CakePhp
But in my case, this is just a simples aplication. I don't use database and i don't use no any controller. I just use layout stuffs.