1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
|
function show_me_the_way_clic($root, $url_r = true)
{
global $lang;
$title_chemin = ' ' ;
$cm = & get_manager ( "category" ) ;
$re = & MyRewriteEngine ::getInstance ( ) ;
while ($root!= 0)
{
$criteria = new Criteria("id",$root);
$criteria->setLimit(1);
$cols = array('id','name','root');
$category =& $cm->get($root,$cols);
$root = $category->getVar('root');
// La petite modif est dans ce bloc-là
if ($title_chemin == '')
{
$title_chemin = ' > <h1> <a href = "' .$re->buildUrl ('category', array ('name' => $category -> getVar('name') ,'id' => $category -> getVar('id') ) ) .'">' .$category -> getVar ('name') . '</a> </h1>' .$title_chemin ;
}
else
{
$title_chemin = ' > <a href="'.$re -> buildUrl ('category' ,array('name' => $category -> getVar('name'), 'id' => $category -> getVar('id') ) ) .'"> '.$category -> getVar('name') .'</a>' .$title_chemin;
}
}
$title_chemin = "<a href='./'title='".$lang['home']."'>".$lang['home'].'</a>'.$title_chemin;
return $title_chemin;
}
} |