diff --git a/Models/LinkType.php b/Models/LinkType.php index f5792a2..8d7a4b7 100755 --- a/Models/LinkType.php +++ b/Models/LinkType.php @@ -27,5 +27,6 @@ use phpOMS\Stdlib\Base\Enum; abstract class LinkType extends Enum { public const CATEGORY = 0; + public const LINK = 1; } diff --git a/Models/NavElement.php b/Models/NavElement.php index a195657..2664057 100755 --- a/Models/NavElement.php +++ b/Models/NavElement.php @@ -25,18 +25,32 @@ namespace Modules\Navigation\Models; class NavElement { public int $id = 0; + public string $pid = ''; + public string $name = ''; + public int $type = 1; + public int $subtype = 2; + public ?string $icon = null; + public ?string $uri = null; + public string $target = 'self'; + public ?string $action = null; + public string $from = '0'; + public int $order = 1; + public int $parent = 0; + public ?int $permissionPerm = null; + public ?int $permissionType = null; + public ?int $permissionElement = null; } diff --git a/Theme/Backend/side.tpl.php b/Theme/Backend/side.tpl.php index 0b549e6..cbd805b 100755 --- a/Theme/Backend/side.tpl.php +++ b/Theme/Backend/side.tpl.php @@ -29,7 +29,7 @@ if (isset($this->nav[NavigationType::SIDE])) : ?> - = $this->getHtml($parent['nav_name'], 'Navigation') ?> + = $this->getHtml($parent['nav_name'], 'Navigation'); ?> nav[NavigationType::SIDE][LinkType::LINK])) : foreach ($this->nav[NavigationType::SIDE][LinkType::LINK] as $key2 => $link) : if ($link['nav_parent'] === $key) : @@ -40,8 +40,8 @@ if (isset($this->nav[NavigationType::SIDE])) : ?> // todo: very simpleminded solution. doesn't work for root path /en/backend etc. e.g. dashboard // this also fails for urls which are not structured like a tree ?> -