Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • johannesdach Friend
    #154973

    Hi,
    I would like to display different instances of the Main Menu (i.e. Mega Menu) if a user has logged in. I tried to to it with the plugin MetaMod, which can load different instances of a module, but since the Mega Menu is not a module but rather hard coded this seems to be more difficult.

    There was anothe post here: http://www.joomlart.com/forums/topic/load-a-different-mega-menu-if-user-is-logged-in/
    with the same question. However the solution provided doesn’t work for me.

    I copied this PHP code to the very top of /templates/ja_kyanite_ii/layouts/blocks/mainnav.php

    [PHP]
    <?php
    $user = & JFactory::getUser();
    if ($user->get(‘guest’)) {
    //not login
    T3Parameter::_setParam (‘menutype’, ‘pubic_menu’);
    } else {
    //login
    T3Parameter::_setParam (‘menutype’, ‘logged_in_menu’);
    }
    ?>
    [/PHP]

    and changed the menu names to the desired menus. However I get the error “Fatal error: Class ‘T3Parameter’ not found on line 5.

    It would be great if I could get some help here!
    Cheers

    Don Lee Friend
    #357876

    Hi,

    That guide is for JAT3v2 so you can not apply it for your JAT3v1.
    Plz follow my steps:
    – Open file templates/ja_kyanite_ii/index.php
    – Find this code

    $ja_menutype = $tmplTools->getMenuType();
    – Add before:

    $user = & JFactory::getUser();
    if ($user->get('guest')) {
    //not login
    $tmplTools->setParam('menutype', 'MENU_ID_WHEN_NOT_LOGIN');
    } else {
    //login
    $tmplTools->setParam('menutype', 'MENU_ID_WHEN_LOGIN');
    }

    Remember to replace right menu ID to the red text.

    johannesdach Friend
    #357918

    Thank you very much! That worked like a charm! 🙂

    railer Friend
    #395325

    Hi Don,

    Thanks! That helped me too!

    Best,
    railer

Viewing 4 posts - 1 through 4 (of 4 total)

This topic contains 4 replies, has 3 voices, and was last updated by  railer 13 years, 4 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum