Solution to this: See bottom.
create a new joomla 3.3.3 (or higher) page, add some languages (de, en, nl for example) and create a module for the breadcrumbs.
Set a default menu-item (home) for every language and some other ones with submenu-items, to test breadcrumb.
Breadcrumb should display the menuitems in the breacrumb as pathway like in one-language-sites.
only "you are here" is displayed, because jpathwaysite does not return anything.
Joomla 3.3 and 3.3.6
$app = JFactory::getApplication();
$pathway = $app->getPathway();
$items = $pathway->getPathWay();
print_r($pathway); print_r($items); die();
It only outputs an empty array.
open the file: /libraries/cms/pathway/site.php
At line 40 there is this code:
$menus = $menu->getMenu();
$home = $menu->getDefault();
if (is_object($home) && ($item->id != $home->id)) {
...
I changed this code to the following:
$menus = $menu->getMenu();
$home = $menu->getDefault();
// Startpage of multilanguage-pages.
if (empty($home)) {
$lang = JFactory::getLanguage();
$lang_tag = $lang->getTag();
$home = $menu->getDefault($lang_tag);
}
if (is_object($home) && ($item->id != $home->id)) {
...
The reason is that $home is never empty in a multilanguage site, as a menu with a menu item set to ALL languages should always exist and not displayed.
Therefore, if we really needed to check home we would do
$menus = $menu->getMenu();
$home = $menu->getDefault();
$lang = JFactory::getLanguage();
$lang_tag = $lang->getTag();
$home = $menu->getDefault($lang_tag);
if ($home->language == '*' && JLanguageMultilang::isEnabled())
{
$home = $menu->getDefault($lang_tag);
}
Not sure it is necessary
I also cannot reproduce here (www.richard-fath.de).
This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/4988.
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2014-11-05 08:37:13 |
Priority | Urgent | ⇒ | Medium |
Labels |
Added:
?
|
Can you create a Pull Request with your solution? See http://docs.joomla.org/Using_the_Github_UI_to_Make_Pull_Requests for how to do it.
If we have a PR, then it can be tested.