0
Welcome Guest! Login
0 items Join Now

SOLVED splitmenu selectbox, when drop down is active

  • SOLVED splitmenu selectbox, when drop down is active

    Posted 6 years 7 months ago
    • Hi there,

      in the template backend i selected dropdown menu and choosed "selectbox" as responsive menu.
      If on the main page a module with roknav splitmenu is active, a selectbox appears at the very bottom with the main menu.
      Some points of interest
      • the "main menu" is assigned to dropdown in template backend
      • to the splitbox roknav module is another menu assigned, e.g. "author login"
      • the splitbox roknav module is assigned to position "sidebar b"
      • at the very end with no position, the "main menu" appears again as selectbox, but
        due to the splitmenu! If I disable it, the box disappears

      Who has an idea how to fix that?

      This image is hidden for guests.
      Please log in or register to see it.

      This image is hidden for guests.
      Please log in or register to see it.
    • Matt's Avatar
    • Matt
    • Preeminent Rocketeer
    • Posts: 21503
    • Thanks: 3081
    • messin' with stuff

    Re: SOLVED splitmenu selectbox, when drop down is active

    Posted 6 years 7 months ago
    • I'm confused... do you want a Dropdown Menu or a Splitmenu?

      RokNavMenu is a RocketTheme thing... not a Gantry Thing... RokNavMenu is obviously intended to work with Gantry but only RocketTheme templates have the proper styling for it... seems like you're using the base Gantry template... only RocketTheme templates have the correct CSS to hide the mobile menu when the viewport is above 767px

      (at least that's my understanding and assumption for why that mobile menu isn't being hidden... I'm not a dev)
    • Last Edit: 6 years 7 months ago by Matt.
    • SEARCH the forum first! These boards are rich in knowledge and vast in topics. This includes searching just the 'Solved' forums, using Google, and using ChatGPT :woohoo:
  • Re: SOLVED splitmenu selectbox, when drop down is active

    Posted 6 years 7 months ago
    • Well, I checked another template: Epsilon of RocketTheme. The issue remains when switched to that template.
      As soon as a splitmenu is enabled via normal module position instead of gantry feature, the mobile menu apears on desktop and the panel menu of dropdown (enabled as gantry feature) is messed up.

      epsilon config
      This image is hidden for guests.
      Please log in or register to see it.


      mobile view: site "Fragen & Antworten" has no splitmenu active (sidebar-a)
      This image is hidden for guests.
      Please log in or register to see it.


      mobile view: Author Login has the splitmenu active (sidebar-a)
      This image is hidden for guests.
      Please log in or register to see it.


      desktop view: "Home" has the splitmenu active (sidebar-a)
      This image is hidden for guests.
      Please log in or register to see it.
    • Matt's Avatar
    • Matt
    • Preeminent Rocketeer
    • Posts: 21503
    • Thanks: 3081
    • messin' with stuff

    Re: SOLVED splitmenu selectbox, when drop down is active

    Posted 6 years 7 months ago
    • ok, thank you for clarifying...

      yes... you cannot have both views enabled like that... one or the other... both set to DropDown Menu or both set to Split Menu
    • SEARCH the forum first! These boards are rich in knowledge and vast in topics. This includes searching just the 'Solved' forums, using Google, and using ChatGPT :woohoo:
    • Matt's Avatar
    • Matt
    • Preeminent Rocketeer
    • Posts: 21503
    • Thanks: 3081
    • messin' with stuff

    Re: SOLVED splitmenu selectbox, when drop down is active

    Posted 6 years 7 months ago
    • This message contains only secure information that is visible to Matt, moderators and administrators
    • SEARCH the forum first! These boards are rich in knowledge and vast in topics. This includes searching just the 'Solved' forums, using Google, and using ChatGPT :woohoo:
  • Re: SOLVED splitmenu selectbox, when drop down is active

    Posted 6 years 6 months ago
    • Hi,

      after investigating the issue further, I found out
      • split menu obviously makes sense only as "template" menu or main menu
      • since lack of documentation about this menu type or at least I did not find it, it is up to the user to find out what "split" stand for in the name "split menu". It is somehow stupid but I really did not get it until few days ago.
      • if one anyway puts the split menu on the sidebar while dropdown is active, one will see the issue described in this thread. The reason is a bug in splitmenu template override

        Location: html/mod_roknavmenu/themes/gantry-splitmenu/layout.php
        // wrong
        public function renderMenu(&$menu) {
        
            ob_start();
            $menuname = (isset($this->args['style']) && $this->args['style'] == 'mainmenu') ? 'gf-menu gf-splitmenu' : 'menu';
            ?>
            
            <?php if ($menu->getChildren()) : 
            // wrong  ?>
            <?php if (isset($this->args['style']) && $this->args['style'] == 'mainmenu'): ?>
            <div class="gf-menu-device-container"></div>
        // correct
        public function renderMenu(&$menu) {
        
            ob_start();
            $menuname = (isset($this->args['style']) && $this->args['style'] == 'mainmenu') ? 'gf-menu gf-splitmenu' : 'menu';
            ?>
            
            <?php if ($menu->getChildren()) : 
            // correct: menutype and responsive-menu !
            ?>
            <?php if (isset($this->args['menutype']) && $this->args['menutype'] == 'mainmenu'): ?>
            <div class="gf-menu-device-container responsive-type-<?php echo $this->args['responsive-menu']; ?>"></div>
            <?php endif; ?>
      • besides this, there is an issue with the javascript includes for responsive modes. I will put details in the corresponding thread I opened: www.rockettheme.com/forum/gantry-for-joo...ut-javascript-vs-css
    • Last Edit: 6 years 6 months ago by Christoph Hagedorn. Reason: code formatting
  • Re: SOLVED splitmenu selectbox, when drop down is active

    Posted 6 years 6 months ago
    • Unbelieveable, I just found out that the solution presented is still wrong.

      $this->args 'style' used in the code of my previous post refers to the "Module Style" selected in the back-end (module settings).
      See here in the screenshot
      This image is hidden for guests.
      Please log in or register to see it.



      $this->args 'menutype' refers to the assigned menu and its name picked on creation.
      See here in the screenshot
      This image is hidden for guests.
      Please log in or register to see it.



      Both "args" are taken to distinguish the top menu from the submenu. To take the "style" is for sure not the best option since it relies on the user to make a change at a specific place. But "menutype" is for sure totally wrong. Any string can be put in there.
      To fix that one have to introduce another template variable, which is only set for the "template" menu.
    • Last Edit: 6 years 6 months ago by Christoph Hagedorn.
    • Matt's Avatar
    • Matt
    • Preeminent Rocketeer
    • Posts: 21503
    • Thanks: 3081
    • messin' with stuff

    Re: SOLVED splitmenu selectbox, when drop down is active

    Posted 6 years 6 months ago
    • I did raise a ticket on this with the devs but please bare in mind that G4 and RokNavMenu are older components not currently used in our newer Themes.

      You're obviously an astute php developer and I think the Gantry 5 community could use you :) I also think you'll find it much more enjoyable to work with as it's all open source and hosted on Github where you can interact with our devlopers (very active gitter/slack chat channels too) directly and post issues/suggestions (or pull requests) like this.

      www.rockettheme.com/forum/gantry-for-joo...gantry-4-in-joomla-4
    • SEARCH the forum first! These boards are rich in knowledge and vast in topics. This includes searching just the 'Solved' forums, using Google, and using ChatGPT :woohoo:
  • Re: SOLVED splitmenu selectbox, when drop down is active

    Posted 6 years 6 months ago
    • Hi Matt,

      for sure I will start to switch to Gantry5 within first quarter of 2018. But this involves initially a lot of work to rewrite templates for Gantry5. Until having a new Gantry5 templates I have to keep fixing issues in the old templates.
      For sure I will join the community then too.
    • Matt's Avatar
    • Matt
    • Preeminent Rocketeer
    • Posts: 21503
    • Thanks: 3081
    • messin' with stuff

    Re: SOLVED splitmenu selectbox, when drop down is active

    Posted 6 years 6 months ago
    • :)
    • SEARCH the forum first! These boards are rich in knowledge and vast in topics. This includes searching just the 'Solved' forums, using Google, and using ChatGPT :woohoo:

Time to create page: 0.042 seconds