j'ai besoin de raccourcir d'un niveau (enlever le dernier) de mon breadcrumbs Joomla
ça se passe içi dans /includes/pathwy.php. Mais comment "breaker" le foreach à l'avant-dernier tour ?
Par avance merci pour votre aide
<?php
defined('JPATH_BASE') or die();
class JPathwaySite extends JPathway
{
/** Class constructor */
function __construct($options = array())
{
//Initialise the array
$this->_pathway = array();
$menu =& JSite::getMenu();
if($item = $menu->getActive())
{ $menus = $menu->getMenu();
$home = $menu->getDefault();
if(is_object($home) && ($item->id != $home->id))
{ [b]foreach[/b]($item->tree as $menupath)
{ $url = '';
$link = $menu->getItem($menupath);
switch($link->type)
{ case 'menulink' :
case 'url' :
$url = $link->link;
break;
case 'separator' :
$url = null;
break;
default :
$url = 'index.php?Itemid='.$link->id;
}
$this->addItem( $menus[$menupath]->name, $url);
} // end foreach
}
} // end if getActive
}
}