'.$categoryName.'
+- ';
+ foreach ($recipes as $recipe) {
+ echo '
- '; + View::show("common/recipe", $recipe); + echo ' '; + } + echo '
diff --git a/Controllers/CategoriesController.php b/Controllers/CategoryController.php
similarity index 73%
rename from Controllers/CategoriesController.php
rename to Controllers/CategoryController.php
index 4731be8..85205df 100644
--- a/Controllers/CategoriesController.php
+++ b/Controllers/CategoryController.php
@@ -1,31 +1,31 @@
"http://exemple",
- "IMG_LINK" => "2.jpg",
+ "RECIPE_LINK" => "/recipe/view/2",
+ "IMG_LINK" => "/static/img/recipes/2.jpg",
"NAME" => "Croissant",
"NOTE" => "4.5"
),
array(
- "RECIPE_LINK" => "http://exemple",
- "IMG_LINK" => "2.jpg",
+ "RECIPE_LINK" => "/recipe/view/2",
+ "IMG_LINK" => "/static/img/recipes/2.jpg",
"NAME" => "Croissant",
"NOTE" => "4.5"
),
array(
- "RECIPE_LINK" => "http://exemple",
- "IMG_LINK" => "2.jpg",
+ "RECIPE_LINK" => "/recipe/view/2",
+ "IMG_LINK" => "/static/img/recipes/2.jpg",
"NAME" => "Croissant",
"NOTE" => "4.5"
)
);
-
+
$A_array_categories = array(
"Type de cuisson" => $A_array_recipes_Type_de_cuisson,
"Temps de préparation" => $A_array_recipes_Type_de_cuisson,
@@ -37,5 +37,5 @@ final class CategoriesController
View::show("category/view", $A_array_categories);
}
-
+
}
diff --git a/Views/category/view.php b/Views/category/view.php
index 4575649..d9623e5 100644
--- a/Views/category/view.php
+++ b/Views/category/view.php
@@ -1,21 +1,30 @@
"type_de_cuisson",
+ "Temps de préparation" => "temps_de_preparation",
+ "Difficulté" => "difficulte",
+ "Végan" => "vegan",
+ "Sans gluten" => "sans_gluten",
+ "Sans lactose" => "sans_lactose");
?>
-
+
+
+'.$categoryName.'
+ ';
+ foreach ($recipes as $recipe) {
+ echo '
+