Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>you can know currenty on which page you are by <code>$this-&gt;params['action'];</code>, so you use can this this to set active class either in <code>&lt;li&gt;</code> or in <code>&lt;a&gt;</code></p> <pre><code>&lt;ul id="selectnav"&gt; &lt;li class="&lt;?php echo (!empty($this-&gt;params['action']) &amp;&amp; ($this-&gt;params['action']=='home') )?'active' :'inactive' ?&gt;"&gt; &lt;a href="/"&gt;&lt;i class="icon-hdd"&gt;&lt;/i&gt;Home&lt;/a&gt; &lt;/li&gt; &lt;li class="&lt;?php echo (!empty($this-&gt;params['action']) &amp;&amp; ($this-&gt;params['action']=='about') )?'active' :'inactive' ?&gt;"&gt; &lt;a href="/aboutus"&gt;&lt;i class="icon-heart-empty"&gt;&lt;/i&gt;About&lt;/a&gt; &lt;/li&gt; &lt;li class="&lt;?php echo (!empty($this-&gt;params['action']) &amp;&amp; ($this-&gt;params['action']=='contact') )?'active' :'inactive' ?&gt;"&gt; &lt;a href="/contactus"&gt;&lt;i class="icon-envelope-alt"&gt;&lt;/i&gt;Contact&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt; </code></pre> <p><strong>OR</strong></p> <pre><code> &lt;ul id="selectnav"&gt; &lt;li class="&lt;?php echo (!empty($this-&gt;params['action']) &amp;&amp; ($this-&gt;params['action']=='home') )?'active' :'' ?&gt;"&gt; &lt;a href="/"&gt;&lt;i class="icon-hdd"&gt;&lt;/i&gt;Home&lt;/a&gt; &lt;/li&gt; &lt;li class="&lt;?php echo (!empty($this-&gt;params['action']) &amp;&amp; ($this-&gt;params['action']=='about') )?'active' :'' ?&gt;"&gt; &lt;a href="/aboutus"&gt;&lt;i class="icon-heart-empty"&gt;&lt;/i&gt;About&lt;/a&gt; &lt;/li&gt; &lt;li class="&lt;?php echo (!empty($this-&gt;params['action']) &amp;&amp; ($this-&gt;params['action']=='contact') )?'active' :'' ?&gt;"&gt; &lt;a href="/contactus"&gt;&lt;i class="icon-envelope-alt"&gt;&lt;/i&gt;Contact&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt; </code></pre> <p>The question you referred was right, you can use this method </p>
 

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