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

[eluser]John_Betong[/eluser]
[quote author="NateL" date="1257014141"]Thanks for your help.

"about" is echoed out the first time because in the code you told me to try, I had this code:
Code:
echo '>>>' .$this->uri->uri_string .'<<<';


So, by adding "off" - my code is outputting this:

>>>about<<<>>>off<<<>>>off<<<>>>off<<<>>>off<<<[/quote]
&nbsp;
It looks as though you did not try this line of code:
Code:
echo "<li $toggle>".anchor($url, $title, $toggle) ."</li>";

Your $toggle is being populated with the correct values but it is not being passed to the anchor parameter.

The anchor parameter should return this code if and only if the third parameter is passed:
Code:
<a href='/about/'   class='on'>  about   </a>
  <a href='/contact/' class='off'> contact </a>
  <a href='/help/'    class='off'> help    </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, 08:03 AM



Theme © iAndrew 2016 - Forum software by © MyBB