1

I expired that joomla 2.5 supports menu item association, which enables it to change the language without necessarily being redirected to the front-page.

I would like to generate a list containing all associated menu items of the current menu item. For example: I have three articles about the wheel, each in a different language, but about the same subject, associated with each other and clicking through the language switcher always delivers me the right page.

The #__associations table in the database of joomla stores records consisting only of an id, a context and an md5 hash value, representing all the associations. How is this hash generated?

Greeting philipp

EDIT::

going on searching I found how to get the list in the code of the language filter plugin:

$app = JFactory::getApplication();
$menus = $app->getMenu();
$active = $app->getMenu()->getActive();
JLoader::register('MenusHelper', JPATH_ADMINISTRATOR . '/components/com_menus/helpers   /menus.php');

and finally:

$associations = MenusHelper::getAssociations($active->id);

works!

4

1 回答 1

2

只是为了结束这个问题:

散列是在 json 编码的关联数组中生成administrator/components/com_menus/models/item.php line 1198的 md5 散列。

于 2013-03-27T10:32:58.230 回答