diff --git a/application/views/templates/CISHMVC-Header.php b/application/views/templates/CISHMVC-Header.php index 2acf5f414..a9b429217 100644 --- a/application/views/templates/CISHMVC-Header.php +++ b/application/views/templates/CISHMVC-Header.php @@ -1,3 +1,11 @@ +router, 'menu') && $this->router->menu && property_exists($this->router->menu, 'children')) { + $menu = $this->router->menu->children; + } + } +?> diff --git a/application/views/templates/CISHMVC-Menu/Entry.php b/application/views/templates/CISHMVC-Menu/Entry.php index 9242ba595..58d8ce84d 100644 --- a/application/views/templates/CISHMVC-Menu/Entry.php +++ b/application/views/templates/CISHMVC-Menu/Entry.php @@ -1,37 +1,57 @@ content_id; + +if (!isset($content_id)) + $content_id = $entry->content_id; + +if (!isset($path)) + $path = ''; + +$menu_id .= '-' . $content_id; // TODO(chris): remove! DEBUG #$entry->menu_open = false; -$link = $entry->url; -$target = $entry->target; +if (property_exists($entry, 'path')) { + $lang = getUserLanguage(); + $link = $path . '/' . $entry->path[$lang]; + $active = in_array($content_id, $this->router->breadcrumb); + $menu_open = $active ? true : (property_exists($entry, 'menu_open') ? $entry->menu_open : false); + $target = ''; + $title = htmlspecialchars($entry->sprache[$lang]->titel); +} else { + $link = $entry->url; + $active = false; + $menu_open = $entry->menu_open; + $target = $entry->target; + $title = htmlspecialchars($entry->titel); + $entry->children = $entry->childs; +} ?> -childs) { ?> +children) { ?> - - titel); ?> + +
- class="btn btn-default rounded-0 text-start btn-level-"> - titel); ?> + class="btn btn-default rounded-0 text-start btn-level-"> + - + Toggle Dropdown
-