Welcome Guest, Not a member yet? Register   Sign In
Navigation Help
#1

[eluser]breaddes[/eluser]
I worry about my Navigation System. The following is a common asset, that I include in every View. I'm not sure if this is a proper way to do a Navigation. I can loop the items in foreach or something else, but what would you recommend?

Code:
<ul id="navi">
           &lt;?php $seg = $this->uri->segment(1); ?&gt;

           <li class=&lt;?php if($seg=='home' | empty($seg)): ?&gt;"active"&lt;?php else: ?&gt;"inactive"&lt;?php endif; ?&gt;
               <a href="&lt;?=base_url() ?&gt;home">&lt;?=$this->lang->line('home')?&gt;</a>
           </li>
            
           <li class=&lt;?php if($seg=='glossary'): ?&gt;"active"&lt;?php else: ?&gt;"inactive"&lt;?php endif; ?&gt;
               <a href="&lt;?=base_url() ?&gt;glossary">&lt;?=$this->lang->line('glossary')?&gt;</a>
           </li>
            
           <li class=&lt;?php if($seg=='disclaimer'): ?&gt;"active"&lt;?php else: ?&gt;"inactive"&lt;?php endif; ?&gt;
               <a href="&lt;?=base_url() ?&gt;disclaimer">&lt;?=$this->lang->line('disclaimer')?&gt;</a>
            </li>
        </ul>




Theme © iAndrew 2016 - Forum software by © MyBB