diff --git a/README.md b/README.md index 5e8a11be8038fc599f438f12489adfbfc619dca8..dd201cf5632abadcc8a9d222c33f8a8a343c3673 100755 --- a/README.md +++ b/README.md @@ -3,12 +3,6 @@ Permet d'afficher une catégorie ou une liste de catégories avec leur image. -## To Do - -- Il faut pouvoir éviter d'avoir un foreach si il n'y a qu'une seule catégorie -- Il faut pouvoir afficher n fois la même catégorie -- Pouvoir sélectionner un template de rendu > Traité mais c'est pas fait correctement - ## Variables - widget_title (setWidgetTitle) : Optionnel : Titre H2 du widget diff --git a/view/frontend/templates/widget/category_widget.phtml b/view/frontend/templates/widget/category_widget.phtml index 805889c03ae42f4da641331b660c95197fc10d16..f4c9432e15df207017a044c93754c33fba47f46b 100755 --- a/view/frontend/templates/widget/category_widget.phtml +++ b/view/frontend/templates/widget/category_widget.phtml @@ -22,6 +22,10 @@ <?php if($categories != null): ?> <div class="categories"> <?php + /* + * TODO : Supprimer le foreach lorsqu'il n'y a qu'un enfant + * TODO : Permettre d'afficher plusieurs fois la même catégorie + */ foreach($categories as $category): $cat = $this->getCategoryModel($category->getId()); @@ -34,6 +38,11 @@ <?php endforeach; ?> </div> <?php endif; ?> + <?php + /* + * TODO : Pouvoir sélectionner un template de rendu sans intervenir dans le code + */ + ?> <?php } elseif ($this->getModel("widget/category_widget_img_background.phtml")) { ?> <?php if($categories != null): ?> <div class="categories">