Welcome Guest, Not a member yet? Register   Sign In
Menu Library 1.3 [05 Gen 09]
#31

[eluser]Bob Sawyer[/eluser]
[quote author="Dewos" date="1224268528"]Ops.... Bugfix release.
Hope it's final Big Grin[/quote]

Hmmm... maybe not! The strrpos() bug is fixed but now the menu doesn't display at all! :-)
#32

[eluser]Dewos[/eluser]
[quote author="Bob Sawyer" date="1224269190"][quote author="Dewos" date="1224268528"]Ops.... Bugfix release.
Hope it's final Big Grin[/quote]

Hmmm... maybe not! The strrpos() bug is fixed but now the menu doesn't display at all! :-)[/quote]

My menu work Smile
#33

[eluser]Bob Sawyer[/eluser]
Hmm... I've got nothing. Instructions followed to the letter. Digging into the code now...
#34

[eluser]Bob Sawyer[/eluser]
Aha! Here's the problem. I was following the directions a little too closely. You have the following in the user guide, under "Direct Submit Mode":

Code:
<?php
$menu = array(
        anchor('home', 'Home'),
        anchor('about', 'About Us'),
        anchor('credit', 'Credit Page')
        );
                
$this->menu->create($menu);        
?>

When it actually should be:

Code:
<?php
$menu = array(
        anchor('home', 'Home'),
        anchor('about', 'About Us'),
        anchor('credit', 'Credit Page')
        );
                
echo $this->menu->create($menu);        
?>
#35

[eluser]freshface[/eluser]
What about this:

$config['user'] = array(
anchor('', 'Home'),
anchor('user/logout', 'Logout'),
anchor('user/settings', 'Settings'),
anchor('list/create', 'Create a list'),
anchor('lists', 'Manage lists'),
);

Now

anchor('user/logout', 'Logout'),
anchor('user/settings', 'Settings'),

Get marked as current, but i just wont the active url and not the one that contains user
#36

[eluser]MikeHibbert[/eluser]
Hey Dewos

I have been making similar code for projects I've been doing an I thought you might benefit from some of my experiences.

I made a menu_view that can roll through a set of CI database results and create the items from that.

This is great for when you are taking menus items from a database that has different sections and departments etc. All you do is add to the CI DB result object and the menu will display them all automagically Big Grin

I'm not saying this is the best or better way but I thought I might share an idea

Mike
#37

[eluser]Dewos[/eluser]
[quote author="freshface" date="1231100120"]What about this:
Get marked as current, but i just wont the active url and not the one that contains user[/quote]

Similar bug Fixed in 1.3, but not tested. Time is tiny...

The Views support is easy, let me know if anyone need this.

Happy NewY.
#38

[eluser]Référencement Google[/eluser]
Personally I prefer your library simple and tiny as it is now. Views are project specific, but I am not against see the code if somebody make it.
#39

[eluser]Dewos[/eluser]
[quote author="Too Pixel" date="1231195888"]Personally I prefer your library simple and tiny as it is now. Views are project specific, but I am not against see the code if somebody make it.[/quote]

Me too. :beer:
#40

[eluser]sofbas[/eluser]
[quote author="Dewos" date="1231195159"]

Similar bug Fixed in 1.3, but not tested. Time is tiny...
[/quote]

Hi, this broke single segment menus.

I changed the code to the following:
Code:
return (strripos($match, "/" . $segment) == TRUE) ? ' class=" ' . $current_tag .'"' : NULL;

i.e removed "/" after $segment and this fixed the problem. I don't if I am an isolated case...




Theme © iAndrew 2016 - Forum software by © MyBB