HI,
mainmenu-left and maimenu-right contents are not displayed on mobile and tablet dropdown menus

Both menus are visible on desktop.
Joomla 5 and GK Royal template
Any Idea?

6 days later

HI,
I made the following modifications in layout php file to have top left and right menus in 3 languages (GB FR ES See below)
2 if coding to select left and right menus in the proper language
I add "frontpage nav-transparent" classes in the 3 home pages links to get the proper home page display.
Add of language position to display flags of languages module in header
All is working properly on desktop
On mobile and tablet sticky menu in GB language both left and right menu links are displayed properly in column
In FR and ES language only english right menu is displayed.
it seems that "mainmenu-left and mainmenu-right" as system mainmenu name are used to build sticky menu.
Have a look on https://www.mas-val-chenaie.fr/royal/

Could you propose a modification to solve that?

Regards

<header id="gkHeader" class="gk-clearfix<?php echo ($this->API->modules('header')) ? ' has-headermod' : '';?>">
<div id="gkHeaderNav" class="gkHeaderNav gk-clearfix<?php echo ($this->API->get('menu_type', 'off-canvas') === 'off-canvas') ? ' has-off-canvas' : ''; echo ($this->API->get('menu_fixed', 0)) ? ' affix-top' : ''; echo ($this->API->get('logo_type', 'image') == 'image') ? ' logo-image' : ''; ?>" data-fixed="1">
<?php if($this->API->get('show_menu', 1)) : ?>
<div class="gkMainMenuWrap gkMainMenuLeft">
<?php if($this->API->get('menu_type', 'off-canvas') === 'classic') : ?>
<?php
// Modif 2025-01-16
$lang = JFactory::getLanguage()->getTag();
if ($lang === "en-GB") {
$menuNameLeft = 'mainmenu-left';
} elseif ($lang === "fr-FR") {
$menuNameLeft = 'mainmenu-left-fr';
} else {
$menuNameLeft = 'mainmenu-left-es';
}
$this->mainmenu->loadMenu($this->API->get('menuname', $menuNameLeft));
$this->mainmenu->genMenu($this->API->get('startlevel', 0), $this->API->get('endlevel',-1));
?>
<?php endif; ?>
</div>
<?php endif; ?>

		<div class="gkLogoWrap">
			<?php $this->layout->loadBlock('logo'); ?>
		</div>

		<?php if($this->API->get('show_menu', 1) || $this->API->modules('search')) : ?>
		<div class="gkMainMenuWrap gkMainMenuRight">
			<?php if($this->API->get('show_menu', 1) && $this->API->get('menu_type', 'off-canvas') === 'classic') : ?>
				<?php
					// Modif 2025-01-16
					$lang = JFactory::getLanguage()->getTag();
						if ($lang === "en-GB") {
						$menuNameRight = 'mainmenu-right';
						} elseif ($lang === "fr-FR") {
						$menuNameRight = 'mainmenu-right-fr';
						} else {
						$menuNameRight = 'mainmenu-right-es';
						}
					$this->mainmenu->loadMenu($this->API->get('menuname', $menuNameRight));
					$this->mainmenu->genMenu($this->API->get('startlevel', 0), $this->API->get('endlevel',-1));
				?>
			<?php endif; ?>
			
			<?php // Modif 2025-01-19
				if($this->API->modules('lang')) : ?>
				<div id="gkLang" class="clearfix">
				<jdoc:include type="modules" name="lang" style="none" />
				</div>
			<?php endif; ?>
8 days later

I forgot to add same modification within asidemenu part in default.php file.
It's now working properly.

nav id="aside-menu">
<div class="aside-menu-inner">
<div class="aside-menu-wrap">
<?php
// Modif 2025-01-16
$lang = JFactory::getLanguage()->getTag();
if ($lang === "fr-FR") {
$menuNameLeft = 'mainmenu-left';
} elseif ($lang === "en-GB") {
$menuNameLeft = 'mainmenu-left-en';
} else {
$menuNameLeft = 'mainmenu-left-es';
}
$this->asidemenu->loadMenu($this->API->get('menuname', $menuNameLeft));
$this->asidemenu->genMenu($this->API->get('startlevel', 0), $this->API->get('endlevel',-1));
?>

			<?php
				// Modif 2025-01-16
					$lang = JFactory::getLanguage()->getTag();
						if ($lang === "fr-FR") {
						$menuNameRight = 'mainmenu-right';
						} elseif ($lang === "en-GB") {
						$menuNameRight = 'mainmenu-right-en';
						} else {
						$menuNameRight = 'mainmenu-right-es';
						}
				$this->asidemenu->loadMenu($this->API->get('menuname', $menuNameRight));
				$this->asidemenu->genMenu($this->API->get('startlevel', 0), $this->API->get('endlevel',-1));
			?>
		</div>
Write a Reply...
You need to Login to view replies.