0
Welcome Guest! Login
0 items Join Now

Limit number of sublevels in Rokmoomenu

  • Limit number of sublevels in Rokmoomenu

    Posted 16 years 4 weeks ago
    • Is it possible to limit the number of sublevels shown by rokmoomenu?

      I have a menu in Joomla with 4 sublevels, but I want rokmoomenu to only show the first two ones, keeping the structure of my joomla menu intact.

      Thank you very much!

      Daniel López Azaña
      http://www.gretur.com
  • Re: Limit number of sublevels in Rokmoomenu

    Posted 16 years 4 weeks ago
    • Well, finally I found the answer. Yes, it is possible to limit the number of sublevels shown by rokmoomenu.

      You only have to include the startLevel and endLevel parameters before rendering mainmenu module in rt_utils.php file this way:

      19 elseif ($mtype=="moomenu" or $mtype=="suckerfish") :
      20 //$module->params = "menutype=$menu_name\nshowAllChildren=1\nclass_sfx=top";
      21 $module->params = "menutype=$menu_name\nshowAllChildren=1\nstartLevel=0\nendLevel=2\nclass_sfx=top";
      22 $topnav = $renderer->render( $module, $options );
      23 endif;

      Line 20 is the original one. Line 21 is a new one I've created to include startLevel and endLevel parameters.
    • Ben Lee's Avatar
    • Ben Lee
    • Elite Rocketeer
    • Posts: 4193
    • Thanks: 42

    Re: Limit number of sublevels in Rokmoomenu

    Posted 16 years 3 weeks ago
    • I've seen this request before but I don't understand the reasoning behind it.

      If you don't want to show the menu items, why have them in the first place?

      If you want them to show in a split menu fashion, why not just make a new menu for that part and have it show on the certain assigned main menu item pages that you need it for?
  • Re: Limit number of sublevels in Rokmoomenu

    Posted 16 years 3 weeks ago
    • My website has many sections, each one having many categories in turn. This result in a menu with too many levels and lots of links.

      I want to avoid this behavior, and I also want to keep the structure of my joomla menu intact because I use it to show all menu options in a left menu that changes from section to section.

      Having several joomla menus would result in a higher level of complexity and extra difficulty in managing the joomla installation.

      This way I only have one joomla menu with all items I need, and at the same time I have less unnecessary links in each page of my website.

      Now the change is done, you can view the result here: http://www.gretur.com , with an unique joomla mainmenu, an unique menu module in the left, that is the same module wichever section or category you are, and a rokmoomenu limited in the number of sublevels it can show.
    • Ben Lee's Avatar
    • Ben Lee
    • Elite Rocketeer
    • Posts: 4193
    • Thanks: 42

    Re: Limit number of sublevels in Rokmoomenu

    Posted 16 years 3 weeks ago
    • Daniel López Azaña wrote:
      Now the change is done, you can view the result here: http://www.gretur.com

      Your site looks great! Would you care to share your solution with us...or a link to it if you've posted it somewhere else?

Time to create page: 0.060 seconds