$result = App\Table\Categorie::getByParent(array(0));
if(!empty($result)){
$time = 0;
$i=0;
foreach($result as $post):
$libelle = (isset($post->{'libelle_'.$dr}) and trim($post->{'libelle_'.$dr})!='') ? clean_txt($post->{'libelle_'.$dr}) : clean_txt($post->libelle_fr);
$Photos = App\Table\Photo::getPicture(array($post->id, 'gamme'),true);
if(!empty($Photos))
$photo = "imgsite/gamme/".$Photos->name;
else
$photo = "assets/img/logo.png";
$url='href="'.$post->url.'"';
$s_gammes = App\Table\Categorie::getByParent(array($post->id));
if(!empty($s_gammes)){
foreach($s_gammes as $res):
$Prods = App\Table\Produit::getItems(array($res->id));
if(!empty($Prods)){
$url='href="'.$res->url.'"';
break;
}
endforeach;
}
$style = isset($class[$i]) ? $class[$i] : 'col-sm-3';
$i++;
?>
$time += '0.2';
endforeach;
}?>