Note that there are some explanatory texts on larger screens.

plurals
  1. POActive menu link with CAKEPHP
    primarykey
    data
    text
    <p>I am using CakePHP and I have a doubt.</p> <ol> <li>I have all my views in <strong>app/view/pages/</strong></li> <li>I use url routing <strong>Router :: connect ('/', array ('controller' => 'I REMOVED THE WORD PAGES HERE', 'action' => 'index'));</strong> instead of <br> <strong>Router :: connect ('/', array ('controller' => 'pages', 'action' => 'display', 'home'));</strong> <br> This allows me to have www.site.com/contact instead of www.site.com/pages/contact <br>Where I put "I REMOVED THE PAGES WORD HERE", this is only the single quotes.</li> <li><p>In my menu, I have the following HTML <strong>(app/view/layouts/default.ctp)</strong>:</p> <pre><code>href="contact"&gt;Contact href="about"&gt;About </code></pre> <p>Above, the aim was to show the UL LI but I do not know how to expose code here.</p></li> <li>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.</li> </ol> <p>In PHP I can do, but in CakePHP can not.</p> <p>Could someone please help me? Thank you.</p> <p>This is an exemple of what i'm talking about: <a href="https://stackoverflow.com/questions/17161982/how-to-add-active-class-in-current-page-in-cakephp">how to add active class in current page in CakePhp</a> <br>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. </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload