Joomla! 1.0.12 appears to have a pathway bug. If you use a component other than com_frontpage for the “Home page” of Joomla – meaning the first link in mainmenu and the page that appears when you load the root of the Joomla! site – then when you click on an article you get a “Double pathway”, for example the pathway will state “Home > Home > Title of article”. The Home, or whatever you named this link, part will be duplicated. It isn’t a big problem but it does look unprofessional on your site!
I looked for ages for a fix to this problem, and eventually found it but the site I can not find the site I originally downloaded this fix from. It is courtesy of Reinhard Hiebl – www.hieblmedia.de (whos site is in German, one reason why I’m saving it here). I thought I would throw it online here for your download. The fix is in two parts of code in /includes/pathway.php.
At line 54 in includes/pathway.php:
// Fix for dublicate home if home have childs //
// by Reinhard Hiebl -- www.hieblmedia.de //////
// get first published item
$query = "SELECT id"
. "\n FROM #__menu"
. "\n WHERE published = 1"
. "\n AND parent = 0"
. "\n AND menutype = 'mainmenu'"
. "\n AND access <= " . (int) $my->gid
. "\n ORDER BY ordering"
. "\n LIMIT 1"
;
$database->setQuery( $query );
$first_mitem = $database->loadResult( 'id' );
////////////////////////////////////////////////
And at line 284 in includes/pathway.php immediately after “$item =& $mitems[$mid];”:
// Fix for dublicate home if home have childs //
// by Reinhard Hiebl -- www.hieblmedia.de //////
if ( $item->id == $first_mitem && !$item->parent ) {
break;
}
////////////////////////////////////////////////
I also have the file zipped up so you can just replace includes/pathway.php with this file. Note that this is for version 1.0.12 only, so it might not work with previous or newer versions.
pathway.zip
5 comments
Hello,
Thx so much for this fix… I’ve been looking for it the last 2 day, you REALLY helped me out…
Yannick
Great fix. This ought to be sent to Joomla for inclusion in the core files.
Thanks!
Great fix. This ought to be sent to Joomla for inclusion in the core files.
Thanks!
How to adapt the module pathWay to the search module?
Section_A > Category_B > “Article”
If you when will back to Category_B see you [Blog – Content Category]
If You click search “Article” pathWay sign:
Section_A > Category_B > “Article”
If you when will back to Category_B see you [Table – Content Category]
do always what to display [Blog – Content Category]
How to adapt the module pathWay to the search module?
Section_A > Category_B > “Article”
If you when will back to Category_B see you [Blog – Content Category]
If You click search “Article” pathWay sign:
Section_A > Category_B > “Article”
If you when will back to Category_B see you [Table – Content Category]
do always what to display [Blog – Content Category]
Comments are closed.