Welcome Guest, Not a member yet? Register   Sign In
Include a menu on every page? use url helper in a class?
#11

[eluser]John_Betong[/eluser]
[quote author="NateL" date="1256985210"][quote author="InsiteFX" date="1256984997"]

InsiteFX[/quote]

My CSS is set up and working properly.

Code:
$a =    array
      (
          'home'          => '/home',
          'about'         => '/about',
          'portfolio'      => '/portfolio',
          'contact'       => '/contact'
      );
    
    echo '>>>' .$this->uri->uri_string .'<<<';

    foreach($a as $title => $url):
        $toggle = strpos($this->uri->uri_string, $url) ? ' class="active"' : '';

        echo '>>>' .$toggle .'<<<';
        echo "<li $toggle>".anchor($url, $title)."</li>";
    endforeach;                
    unset($toggle);
    unset($a);
&nbsp;
Try this code and see what is happening. I think that you do not have the uri helper loaded.
&nbsp;


Messages In This Thread
Include a menu on every page? use url helper in a class? - by El Forum - 10-30-2009, 11:39 PM



Theme © iAndrew 2016 - Forum software by © MyBB