diff --git a/src/QUI/Menu/UrlList.php b/src/QUI/Menu/UrlList.php index 889c191d68a62bdd35b4f5b2e9f5263412662fea..3bf2e55b908461068524fd739edeacdaab6a328f 100644 --- a/src/QUI/Menu/UrlList.php +++ b/src/QUI/Menu/UrlList.php @@ -54,12 +54,6 @@ public function __construct($attributes = []) */ public function getBody() { - $Engine = QUI::getTemplateManager()->getEngine(); - - if (!$this->getAttribute('menuId') && !$this->getAttribute('startId')) { - return ''; - } - if ($this->getAttribute('menuId')) { // independent menu $children = $this->getChildrenForIndependentMenu(); @@ -69,15 +63,21 @@ public function getBody() $children = $this->getChildrenForQUISite(); $template = dirname(__FILE__).'/UrlList.Default.html'; } else { - $children = []; + return ''; } - $icon = ''; + $Engine = QUI::getTemplateManager()->getEngine(); + $icon = ''; + $restLinkColorCss = ''; if ($this->getAttribute('icon') && strpos($this->getAttribute('icon'), 'fa ') === 0) { $icon = $this->getAttribute('icon'); } + if ($this->getAttribute('resetLinkColor')) { + $restLinkColorCss = 'quiqqer-urlList-entry-link__resetLinkColor'; + } + switch ($this->getAttribute('display')) { default: case 'default': @@ -85,12 +85,6 @@ public function getBody() break; } - $restLinkColorCss = ''; - if ($this->getAttribute('resetLinkColor')) { - $restLinkColorCss = 'quiqqer-urlList-entry-link__resetLinkColor'; - - } - $Engine->assign([ 'this' => $this, 'headerText' => $this->getAttribute('headerText'),