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

[eluser]John_Betong[/eluser]
[quote author="NateL" date="1256985808"]It is being autoloaded in my autoload.php file:

$autoload['helper'] = array('url', 'form');

edit:
The code you told me to try echos out this:
>>>about<<<>>><<<>>><<<>>><<<>>><<<[/quote]
&nbsp;
OK I am back again and had a chance to look at your code and why it is not working.

In your code your $toggle is working because it outputs about.

The problem is that you have not set the third anchor parameter to toggle the CSS setting

Try this:
Code:
foreach($a as $title => $url):
        $toggle = strpos($this->uri->uri_string, $url) ? ' class="active"' : 'off';
        echo "<li $toggle>".anchor($url, $title, $toggle) ."</li>";
    endforeach;                
    unset($toggle);
    unset($a);
&nbsp;
&nbsp;
&nbsp;


Messages In This Thread
Include a menu on every page? use url helper in a class? - by El Forum - 10-31-2009, 04:53 AM



Theme © iAndrew 2016 - Forum software by © MyBB