Active
Project:
Dynamic Persistent Menu
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
28 Jan 2010 at 08:58 UTC
Updated:
21 Jul 2011 at 07:33 UTC
Jump to comment: Most recent file
I'm using the internationalization module, which allows me to translate the menu to multiple languages by assigning each item to a specific language. The dynamic persistent menu shows all items, regardless of the language. If I have two languages, then I have two menu items for every page. I really like the layout of your menu, but it's not useable as it is for my site.
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | dynamic_persistent_menu.module.txt | 14.4 KB | Sinan Erdem |
Comments
Comment #1
yrocq commentedWill be implemented in version 2.
Comment #2
alex72rm commentedWe are waiting for version 2 for many months. Any news?
Comment #3
Sinan Erdem commentedsubscribe
Comment #4
yrocq commentedFor now, I haven't much time to work on this module. I just changed the "Maintenance status" of the project page to reflect that. This module isn't abandoned but I can't tell when the version 2 will be finished. If someone submit a patch to fix this issue, I will integrate it. I am really sorry for the inconvenience.
Comment #5
yrocq commentedFixed in branch 6.x-2.x.
Comment #7
Sinan Erdem commentedI can confirm that primary level menu items are working ok under different language conditions: if a menu item is on a certain language only, it doesn't show on the other languages.
But if the menu item is secondary level, it is always displayed on every language, even if I choose a specific language for this item..
Comment #8
Sinan Erdem commentedI just solved this issue by adding these lines to corresponding places in dynamic_persistent_menu.module:
Changed this line:
if ($submenu_item['link']['hidden'] == 0) {to this:
if ($submenu_item['link']['hidden'] == 0 && (empty($submenu_item['link']['options']['langcode']) || $submenu_item['link']['options']['langcode'] == $language->language)) {Added this line:
if ($link2['hidden'] == 0 && (empty($link2['options']['langcode']) || $link2['options']['langcode'] == $language->language)) {just before this line:
$submenu_items .= theme('dynamic_persistent_menu_menu_item', $link2, 'dynamic-persistent-menu-sub-menu-item ' . $extra_class, 'dynamic-persistent-menu-sub-menu-item'.$link2['mlid']);And added a
}to close this "if" just after$i++;Comment #9
Sinan Erdem commentedAttaching the final file...