Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • shultman Friend
    #182998

    I´m trying to hide the whole Mega menu for Public users and show it only for Registered and above.
    I want to assign another menu to Public users in the same position.
    Which means that the menu will switch when users log in.

    Any suggestions how to accomplish this?

    Thanks,
    Sune

    Saguaros Moderator
    #475941

    Hi Sune,

    You can try this way:

    – Open file: /templates/ja_university(your default template)/blocks/mainnav.php

    – Replace:
    [PHP]
    <?php $this->genBlockBegin ($block) ?>

    <?php if (($jamenu = $this->loadMenu())) $jamenu->genMenu (); ?>
    <!– jdoc:include type=”menu” level=”0″ / –>

    <?php $this->genBlockEnd ($block) ?>

    <?php if ($this->hasSubmenu() && ($jamenu = $this->loadMenu())) : ?>
    <div id=”ja-subnav” class=”wrap”>
    <div class=”main clearfix”>
    <?php $jamenu->genMenu (1); ?>
    <!– jdoc:include type=”menu” level=”1″ / –>
    </div>
    </div>
    <?php endif;?>
    <ul class=”no-display”>
    <li><a href=”<?php echo $this->getCurrentURL();?>#ja-content” title=”<?php echo JText::_(“SKIP_TO_CONTENT”);?>”><?php echo JText::_(“SKIP_TO_CONTENT”);?></a></li>
    </ul>
    [/PHP]

    With this:
    [PHP]
    <?php $user =& JFactory::getUser();?>
    <?php if($user->id>0):?>
    <?php $this->genBlockBegin ($block) ?>

    <?php if (($jamenu = $this->loadMenu())) $jamenu->genMenu (); ?>
    <!– jdoc:include type=”menu” level=”0″ / –>

    <?php $this->genBlockEnd ($block) ?>

    <?php if ($this->hasSubmenu() && ($jamenu = $this->loadMenu())) : ?>
    <div id=”ja-subnav” class=”wrap”>
    <div class=”main clearfix”>
    <?php $jamenu->genMenu (1); ?>
    <!– jdoc:include type=”menu” level=”1″ / –>
    </div>
    </div>
    <?php endif;?>
    <ul class=”no-display”>
    <li><a href=”<?php echo $this->getCurrentURL();?>#ja-content” title=”<?php echo JText::_(“SKIP_TO_CONTENT”);?>”><?php echo JText::_(“SKIP_TO_CONTENT”);?></a></li>
    </ul>
    <?php endif;?>
    [/PHP]

    Clean JAT3 cache and refresh your site.

    Please note this is major customization and you will have to take backups everytime you upgrade for new version.

    Hope this helps.

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

This topic contains 2 replies, has 2 voices, and was last updated by  Saguaros 11 years, 11 months ago.

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