Closed (fixed)
Project:
Nice Menus
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
18 Dec 2010 at 16:26 UTC
Updated:
30 Aug 2011 at 04:01 UTC
Jump to comment: Most recent file
Comments
Comment #1
botrisYou may also want to consider changing the function name from:
theme_nice_menus_primary_links()
to
theme_nice_menus_main_menu()
for consistency.
Comment #2
vordude commentedBoth good calls.
However, looked at a fresh install from HEAD, and found the variable named, menu_main_links_source (Not menu_main_menu_source as suggested in the patch)
Comment #3
r4f commentedI don't know... I still can't make it work... Installed the newest stable D7, tried all the suggestions here (except changing the functions name since it is irrelevent right now).... still it says:
Notice: Undefined index: content in theme_nice_menus_primary_links() (line 556 of /.../sites/all/modules/nice_menus/nice_menus.module).
Comment #4
botris@Vordude your right, I found that too in HEAD. But I'm a bit confused, the theme layer uses main_menu according to the documentation:
http://drupal.org/update/theme/6/7#menus
So should it be?
$menu_name = variable_get('menu_main_links_source', 'main-menu');
@R4f , can't tell patch works for me.
Do you use the following in your page.tpl.php:
print theme('nice_menus_primary_links');You need to use the "old" function name.
Comment #5
justafishThe patch in the original post worked for me after replacing the call to the menu in my page.tpl.php with
Comment #6
chules commentedWhere exactly in the page.tpl.php is the call to the menu? I am looking to replace it with
print theme('nice_menus_primary_links');but not sure which line(s) to replace.thank you chules
Comment #7
alpritt commentedYes.
This patch changes the function names and other references to primary and secondary links and fixes the above.
Comment #8
alpritt commentedLast patch missed a reference to 'primary links' in the README.
Comment #9
amateescu commentedAnother re-roll for current HEAD which fixes the following:
-
theme_nice_menus_main_menu()andtheme_nice_menus_secondary_menu()should not receive a$menuvariable because they already know what menu they're supposed to theme.- removes deprecated D6 theme functions.
- fixes some Doxygen blocks that didn't have an empty line before the
$returnstatement.With this patch, printing the main menu is as simple as:
Comment #10
cesar.brod@gmail.com commentedThis worked fine for me. I haven't been able to figure out how to style the original rounded corners main menu you can see in Bartik though. Any hints?
Comment #11
JoelAddison commentedTested the patch in #9 against 7.x-2.0-beta3, and everything is working as expected. It would be great if this could be committed, as I am sure I am not the only one needing to patch this everytime a new version is released.
Comment #12
vordude commentedcommitted with fe14c0e900ae586ef15 thanks for hammering this out.