vid);
$accueil = array();
foreach ($tree as $term) {
$name = $term->name;
if (strpos($name, 'Aide') === false) {
$tid = $term->tid;
$description = $term->description;
if($term->parents[0]>0) {
$detail = taxonomy_term_load($tid);
if (isset($detail->field_logo_dialogue['und'][0]['uri'])){
$imageurl = $detail->field_logo_dialogue['und'][0]['uri'];
} else {
$imageurl = '';
}
$accueil[$name] = (object) array( 'name'=>$name, 'tid'=>$tid, 'imageurl'=>$imageurl, 'description'=>$description);
}
}
}
ksort($accueil );
foreach ($accueil as $key => $term ) {
echo '';
}
?>
' .$term->name. '
'; $description = $term->description; $nbchar = 999; if( strlen($description ) > $nbchar) { $description = substr($description, 0, $nbchar); $last_space = strrpos($description, " "); $description = substr($description, 0, $last_space). " ..."; } if ($term->imageurl > '') echo ''; echo '' .$description .'
';
echo '