JoomDev: Hide mega menu from logged in users (1/1)

Introducing astroid v2.0 with article types, custom badges and much more. Download Now

Welcome, Guest
Username: Password: Remember me

TOPIC: Hide mega menu from logged in users

Hide mega menu from logged in users 2 months 2 weeks ago #7828

  • seabird
  • seabird's Avatar
  • Offline
  • New Member
  • Posts: 16
  • Karma: 0
Hi,

I use JD boston and is it possible to hide mega menu from logged in users like this documentation ?: docs.joomla.org/How_do_you_hide_somethin...m_logged_in_users%3F
It is OK for offcanvas , but I do not know how to do this for mega menu.

Thanks,

Eric
The administrator has disabled public write access.

Hide mega menu from logged in users 2 months 2 weeks ago #7832

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Posts: 1110
  • Thank you received: 157
  • Karma: 27
Hi Eric,

The Mega menu comes from the HTML of the page directly and there is no way to hide it via module manager of core Joomla backend functions.

You may hide it using CSS.

If you can provide me the site link, I'll give the exact CSS you need to write in order to hide it.

Thanks,
Chetan
Thank You,
If you like our support and products, tweet us at joomdev and let the world know about it.
The administrator has disabled public write access.

Hide mega menu from logged in users 2 months 2 weeks ago #7834

  • seabird
  • seabird's Avatar
  • Offline
  • New Member
  • Posts: 16
  • Karma: 0
Hi Chetan,

I do the modification in jd_boston/features/menu.php

$user = &JFactory::getUser() ;
if ( !$user->id ) {
if($menu_type == 'mega_offcanvas') { ?>
			<div class='sp-megamenu-wrapper'>
				<a id="offcanvas-toggler" href="#"><i class="fa fa-bars"></i></a>
				<?php $this->helix3->loadMegaMenu('hidden-sm hidden-xs'); ?>
			</div>
		<?php } else if ($menu_type == 'mega') { ?>
			<div class='sp-megamenu-wrapper'>
				<a id="offcanvas-toggler" class="visible-sm visible-xs" href="#"><i class="fa fa-bars"></i></a>
				<?php $this->helix3->loadMegaMenu('hidden-sm hidden-xs'); ?>
			</div>
		<?php } else { ?>
			<a id="offcanvas-toggler" href="#"><i class="fa fa-bars"></i></a>
		<?php }
}

Eric
The administrator has disabled public write access.

Hide mega menu from logged in users 2 months 2 weeks ago #7841

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Posts: 1110
  • Thank you received: 157
  • Karma: 27
Way to go Eric.

Thanks for posting back to your code. I am positive it will help someone else too.

Please post back if you need any further help.

Thanks,
Chetan
Thank You,
If you like our support and products, tweet us at joomdev and let the world know about it.
The administrator has disabled public write access.
Time to create page: 0.379 seconds