aboutsummaryrefslogtreecommitdiff
path: root/src/view
diff options
context:
space:
mode:
authorpolo <ordipolo@gmx.fr>2025-11-02 20:51:05 +0100
committerpolo <ordipolo@gmx.fr>2025-11-02 20:51:05 +0100
commit4c9786a3faf12f423b2431883bc23c07c84fc7c0 (patch)
tree1d286cb5a15f3cee08a6339269615dfd4f95b4e1 /src/view
parent28d300b48ded1d472d3593f3afc0c71c4fd2e0aa (diff)
downloadcms-4c9786a3faf12f423b2431883bc23c07c84fc7c0.tar.gz
cms-4c9786a3faf12f423b2431883bc23c07c84fc7c0.tar.bz2
cms-4c9786a3faf12f423b2431883bc23c07c84fc7c0.zip
menu caché seulement si il ne comporte vraiment qu'une entrée
Diffstat (limited to 'src/view')
-rw-r--r--src/view/NavBuilder.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/view/NavBuilder.php b/src/view/NavBuilder.php
index 03b4c97..6caefbc 100644
--- a/src/view/NavBuilder.php
+++ b/src/view/NavBuilder.php
@@ -13,7 +13,7 @@ class NavBuilder extends AbstractBuilder
13 public function __construct(Node $node = null) 13 public function __construct(Node $node = null)
14 { 14 {
15 $this->html .= '<nav class="nav_main"><ul>'; 15 $this->html .= '<nav class="nav_main"><ul>';
16 if(count(Model::$menu->getChildren()) > 1){ 16 if(count(Model::$menu->getChildren()) > 1 || !Model::$menu->getChildren()[0]->getChildren()->isEmpty()){
17 $this->html .= $this->navMainHTML( 17 $this->html .= $this->navMainHTML(
18 Model::$menu, // Menu étend Page 18 Model::$menu, // Menu étend Page
19 Model::$page_path != null ? Model::$page_path->getArray() : []); // param nullable, ça retire une dépendance stricte entre NavBuilder et Model 19 Model::$page_path != null ? Model::$page_path->getArray() : []); // param nullable, ça retire une dépendance stricte entre NavBuilder et Model