diff --git a/locale.xml b/locale.xml index cb9b5a9f18db2405644e4f6c28f78c399db527ec..8f02ceeac574c760f4e66ad4bae530a877fa8574 100644 --- a/locale.xml +++ b/locale.xml @@ -33,6 +33,10 @@ <de><![CDATA[MegaMenu - Einfache Liste mit Untereseiten]]></de> <en><![CDATA[MegaMenu - Simple list mit sub pages]]></en> </locale> + <locale name="menu.settings.noMenu"> + <de><![CDATA[MegaMenu - Kein DropDown Menü]]></de> + <en><![CDATA[MegaMenu - No DropDown Menu]]></en> + </locale> <!-- sidebar menu --> @@ -41,16 +45,16 @@ <en><![CDATA[Layout]]></en> <pl><![CDATA[layout]]></pl> </locale> - <locale name="menu.control.navigation.setting.display.simple"> - <de><![CDATA[Einfach]]></de> - <en><![CDATA[Simple]]></en> - <pl><![CDATA[Prosty]]></pl> - </locale> - <locale name="menu.control.navigation.setting.display.advanced"> - <de><![CDATA[Erweitert]]></de> - <en><![CDATA[Advanced]]></en> - <pl><![CDATA[Zaawansowany]]></pl> - </locale> + <locale name="menu.control.navigation.setting.display.simple"> + <de><![CDATA[Einfach]]></de> + <en><![CDATA[Simple]]></en> + <pl><![CDATA[Prosty]]></pl> + </locale> + <locale name="menu.control.navigation.setting.display.advanced"> + <de><![CDATA[Erweitert]]></de> + <en><![CDATA[Advanced]]></en> + <pl><![CDATA[Zaawansowany]]></pl> + </locale> <locale name="menu.control.navigation.setting.startId"> <de><![CDATA[Start-ID]]></de> <en><![CDATA[Start ID]]></en> @@ -76,21 +80,21 @@ <en><![CDATA[List type]]></en> <pl><![CDATA[Rodzaj listy]]></pl> </locale> - <locale name="menu.control.navigation.setting.listType.fontAwesome"> - <de><![CDATA[Font Awesome Icons]]></de> - <en><![CDATA[Font Awesome icons]]></en> - <pl><![CDATA[Ikony Font Awesome]]></pl> - </locale> - <locale name="menu.control.navigation.setting.listType.sitePicture"> - <de><![CDATA[Seiten Bilder bzw. Icons]]></de> - <en><![CDATA[Site picture or icons]]></en> - <pl><![CDATA[Zdjecie lub ikona strony]]></pl> - </locale> - <locale name="menu.control.navigation.setting.listType.none"> - <de><![CDATA[Ohne]]></de> - <en><![CDATA[None]]></en> - <pl><![CDATA[Brak]]></pl> - </locale> + <locale name="menu.control.navigation.setting.listType.fontAwesome"> + <de><![CDATA[Font Awesome Icons]]></de> + <en><![CDATA[Font Awesome icons]]></en> + <pl><![CDATA[Ikony Font Awesome]]></pl> + </locale> + <locale name="menu.control.navigation.setting.listType.sitePicture"> + <de><![CDATA[Seiten Bilder bzw. Icons]]></de> + <en><![CDATA[Site picture or icons]]></en> + <pl><![CDATA[Zdjecie lub ikona strony]]></pl> + </locale> + <locale name="menu.control.navigation.setting.listType.none"> + <de><![CDATA[Ohne]]></de> + <en><![CDATA[None]]></en> + <pl><![CDATA[Brak]]></pl> + </locale> <locale name="menu.control.navigation.setting.parentIcon"> <de><![CDATA[Eltern-Seite Icon<br/>Standard: fa-home]]></de> diff --git a/settings.xml b/settings.xml index 00ac0718054358cb57cf36e4a675d3fde60718c3..25dfc1f15f36cda0ad7ec70c1f7dbec3c15f9f66 100644 --- a/settings.xml +++ b/settings.xml @@ -43,6 +43,9 @@ <option value="Simple"> <locale group="quiqqer/menu" var="menu.settings.Simple"/> </option> + <option value="noMenu"> + <locale group="quiqqer/menu" var="menu.settings.noMenu"/> + </option> </select> </settings> </category> diff --git a/site.xml b/site.xml index 887463fda90c186e7a56cce7a9e13a6b53d7fcad..27416b543bf8a506c0d1d38e0284dbbfe11d9adf 100644 --- a/site.xml +++ b/site.xml @@ -38,6 +38,9 @@ <option value="Simple"> <locale group="quiqqer/menu" var="menu.settings.Simple"/> </option> + <option value="noMenu"> + <locale group="quiqqer/menu" var="menu.settings.noMenu"/> + </option> </select> </select> </settings> diff --git a/src/QUI/Menu/MegaMenu.html b/src/QUI/Menu/MegaMenu.html index 9a404a875ece282c2784269de209fea76402ac4f..8795d58567fdc118bd157b960587f8c4ab448c87 100644 --- a/src/QUI/Menu/MegaMenu.html +++ b/src/QUI/Menu/MegaMenu.html @@ -25,18 +25,20 @@ title="{$Child->getAttribute('title')|escape:"html"}"> {$Child->getAttribute('title')} - {if count($subchildren)}<span class="fa fa-angle-down"></span>{/if} + {if $showMenu && count($subchildren)}<span class="fa fa-angle-down"></span>{/if} </a> - {if $Child->getAttribute('quiqqer.megamenu.settings.type') && $Child->getAttribute('quiqqer.megamenu.settings.type') !== ''} + {if $showMenu && $Child->getAttribute('quiqqer.megamenu.settings.type') && $Child->getAttribute('quiqqer.megamenu.settings.type') !== ''} {assign var=usedControl value=$this->getMenuControl($Child->getAttribute('quiqqer.megamenu.settings.type'))} {/if} - {control control=$usedControl Site=$Child assign=Control} - {if $Control->count()} - <div class="quiqqer-menu-megaMenu-list-item-menu"> - {$Control->create()} - </div> + {if $showMenu && $usedControl} + {control control=$usedControl Site=$Child assign=Control} + {if $Control->count()} + <div class="quiqqer-menu-megaMenu-list-item-menu"> + {$Control->create()} + </div> + {/if} {/if} </li> {/foreach} diff --git a/src/QUI/Menu/MegaMenu.php b/src/QUI/Menu/MegaMenu.php index 95f87f6e5d5c397f11435eb47a2cd7ac851bd56c..0285078a955565df7f6820da2a4f5cba7113a57e 100644 --- a/src/QUI/Menu/MegaMenu.php +++ b/src/QUI/Menu/MegaMenu.php @@ -82,9 +82,14 @@ public function getBody() 'jsControl' => 'package/quiqqer/menu/bin/MegaMenu', 'prepend' => $this->prepend, 'append' => $this->append, - 'childControl' => $childControl + 'childControl' => $childControl, + 'showMenu' => true )); + if ($this->getProject()->getConfig('menu.settings.type') == 'noMenu') { + $Engine->assign('showMenu', false); + } + return $Engine->fetch(dirname(__FILE__) . '/MegaMenu.html'); } @@ -128,6 +133,9 @@ public function getMenuControl($control) case 'Simple': case QUI\Menu\Mega\Simple::class: return QUI\Menu\Mega\Simple::class; + + case 'noMenu': + return false; } if ($this->getAttribute('display')) { @@ -151,6 +159,9 @@ public function getMenuControl($control) case 'Simple': case QUI\Menu\Mega\Simple::class: return QUI\Menu\Mega\Simple::class; + + case 'noMenu': + return false; } }