[SOLVED][module] Menu_links - doesn't appears on login page

JeanHenri79
JeanHenri79's picture

Joined: 2012-06-05
Posts: 5
Posted: Tue, 2012-06-05 07:31

Hello,

I'm using menu_links module to add link before "home" menu. This link redirect user on my main website.
All is fine when i am a registered user. But when I am 'guest', and with none public album, the login page doesn't show the link to my website, there is only one menu : the "home" menu.

I'm exploring source files, but i haven't discover where the "site_menu" is made for the login page. I found in modules/gallery/helpers/gallery_event the function site_menu() but it seems not to be used for login page.

Can anyone help me ?

Sorry for my english, i'm writing from France.

Thanks.

Jean

 
JeanHenri79
JeanHenri79's picture

Joined: 2012-06-05
Posts: 5
Posted: Tue, 2012-06-05 08:44

Hi,

I have solved my problem !

In the file modules/menu_links/helpers/menu_links_events.php, the lines

if (module::get_var("menu_links", "title") != null) {
  $menu->add_before("home", Menu::factory("link")
    		            ->id("root")
			    ->label(module::get_var("menu_links", "title"))
			    ->url(module::get_var("menu_links", "url")));
	}

must be placed after

$menu->append(Menu::factory("link")
              ->id("home")
              ->css_id("g-menu-link-remove")
              ->label(module::get_var("menu_links", "title2"))
              ->url(item::root()->url()));

Now all is fine !

Jean