Replace Yootheme Menu with Maximenu CK

Replied by DaffRider on topic Replace Yootheme Menu with Maximenu CK

Posted 9 years 7 months ago #21582
before i use this code
Code:
<body class="<?php echo $this['config']->get('body_classes'); ?>"> <?php if ($this['widgets']->count('logo + menu + search')) : ?> <div class="tm-block-top"> <div class="uk-container uk-container-center"> <?php if ($this['widgets']->count('logo')) : ?> <a class="tm-logo uk-visible-large" href="<?php echo $this['config']->get('site_url'); ?>"><?php echo $this['widgets']->render('logo'); ?></a> <?php endif; ?> <?php if ($this['widgets']->count('menu + megamenu + search')) : ?> <nav class="tm-navbar uk-navbar uk-navbar-attached"> <?php if ($this['widgets']->count('megamenu')) : ?> <section class="<?php echo $grid_classes['megamenu']; ?>" data-uk-grid-match="{target:'> div > .uk-panel'}" data-uk-grid-margin><?php echo $this['widgets']->render('megamenu', array('layout'=> $this['config']->get('grid.megamenu.layout'))); ?></section> <?php endif; ?> <?php if ($this['widgets']->count('menu')) : ?> <?php echo $this['widgets']->render('menu'); ?> <?php endif; ?> <?php if ($this['widgets']->count('offcanvas')) : ?> <a href="#offcanvas" class="uk-navbar-toggle uk-hidden-large" data-uk-offcanvas></a> <?php endif; ?> <?php if ($this['widgets']->count('search')) : ?> <div class="uk-navbar-flip"> <div class="uk-navbar-content uk-visible-large"><?php echo $this['widgets']->render('search'); ?></div> </div> <?php endif; ?> <?php if ($this['widgets']->count('usertop')) : ?> <div class="tm-usertop uk-navbar-flip"><?php echo $this['widgets']->render('usertop'); ?></a></div> <?php endif; ?> <?php if ($this['widgets']->count('logo-small')) : ?> <div class="uk-navbar-content uk-navbar-center uk-hidden-large"><a class="tm-logo-small" href="<?php echo $this['config']->get('site_url'); ?>"><?php echo $this['widgets']->render('logo-small'); ?></a></div> <?php endif; ?> </nav> <?php endif; ?> </div> </div>

Please Log in or Create an account to join the conversation.

Replied by nsheehan123 on topic Replace Yootheme Menu with Maximenu CK

Posted 9 years 5 months ago #22667
Not sure if you got this to work or not, the easiest way to replace the YooTheme Menu is to replace the position "Menu" in the templateDetails.xml file with "MaxiMenu", then do a search and replace in the theme.php file for Menu and replace with MaxiMenu.

Place the Main Menu module in the Position MaxiMenu and voila.

This prevents Yootheme from applying any Menu class CSS to MaxiMenu, but MaxiMenu will behave like the standard Yootheme Menu for breakpoints, and Mobile views.

Cheers.
Last Edit:9 years 5 months ago by nsheehan123
Last edit: 9 years 5 months ago by nsheehan123.

Please Log in or Create an account to join the conversation.

Replied by brianelkins on topic Replace Yootheme Menu with Maximenu CK

Posted 9 years 5 months ago #22692
Hi Nsheehan123,

Would you mind posting an example of your change you used and placed in the custom.ccs, that hides the MaxiMenuCK at a specific breakpoint?

It would really be big help.

Best regards,
Last Edit:9 years 5 months ago by brianelkins
Last edit: 9 years 5 months ago by brianelkins.

Please Log in or Create an account to join the conversation.

Replied by nsheehan123 on topic Replace Yootheme Menu with Maximenu CK

Posted 9 years 5 months ago #22693
I didn't need to add to the custom.css, for the menu. :)
The module position's class determines if it is shown based on device or breakpoint, this doesn't change.

Take a look at www.rppeo.ca

Cheers
Last Edit:9 years 5 months ago by nsheehan123
Last edit: 9 years 5 months ago by nsheehan123. Reason: Clarity

Please Log in or Create an account to join the conversation.

Replied by brianelkins on topic Replace Yootheme Menu with Maximenu CK

Posted 9 years 5 months ago #22694
Interesting...that doesn't seem to be the case with my setup. The menu stays on ALL responsive sizes/breakpoints.

Specs are:
Joomla = 3.3.6
WARP = 7.3.0
YooTheme = EAT 1.0.3

Recapping the steps:
1) Modified templateDetails.xml, and added:
Code:
<position settings="">maximenu</position>
2) Modified layouts/theme.php, and added:
Code:
count('menu + maximenu + search')
...and
Code:
<?php if ($this['widgets']->count('maximenu')) : ?> <?php echo $this['widgets']->render('maximenu'); ?> <?php endif; ?>
3) Refresh browser and menu displays no problem. But, stays on all breakpoints.

What do your specs look like, or is there something else I'm missing?

Best regards,

Please Log in or Create an account to join the conversation.

Replied by nsheehan123 on topic Replace Yootheme Menu with Maximenu CK

Posted 9 years 5 months ago #22695
It may be a little different with Eat. I'm using it too, but not with MaxiMenu. I can see what happens.

Did you try removing Menu?
count('menu + maximenu + search')

count('maximenu + search')

Do a search - Replace for all menu to maximenu.

Please Log in or Create an account to join the conversation.

Time to create page: 0.732 seconds

Fast and powerful creation, customizable and responsive.

Read More

We have 780 guests and no members online