0
Welcome Guest! Login
0 items Join Now

Counting menu items from the template: Joomla 1.5

    • erc's Avatar
    • erc
    • Newbie
    • Posts: 13
    • Thanks: 0

    Counting menu items from the template: Joomla 1.5

    Posted 17 years 2 weeks ago
    • Ok, so here's the situation.

      The new menu module in Joomla 1.5 is great. I love the way you can limit the levels of items that it can display. The only problem is that quite possible you have a menu module that doesn't always have items to show.

      Example: You have a menu that shows only 2nd level child menu items. You're on a page where no 2nd menu child items exist. The problem here is that the menu is still published and displayed even though it's empty.

      So my question is this: Is it possible to count the number menu items showing in a module, and not display the module if there aren't any items to show?
    • erc's Avatar
    • erc
    • Newbie
    • Posts: 13
    • Thanks: 0

    Re: Counting menu items from the template: Joomla 1.5

    Posted 17 years 2 weeks ago
    • I've used this to get the full menu object, but haven't been able to get any further:

      $menus =& JMenu::getInstance('site');

      or

      $menu = JSite :: getMenu();

      Maybe a solution can be figured out with a little cash incentive? Would anyone be willing to write a little template code to do this for $75?
    • Last Edit: 17 years 2 weeks ago by erc.

Time to create page: 0.071 seconds