Replace Yootheme Menu with Maximenu CK

Replied by DaffRider on topic Replace Yootheme Menu with Maximenu CK

Posted 9 years 8 months ago #21575
houps

désolé je l'avais pas réactivé

181.224.142.124/~cgitrain/

j'utilise le theme Moreno de chez Yootheme

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 8 months ago #21579
I just see the Yootheme menu using it's default uk-nav classes.
In Modules, create a new module, type MaxiMenu CK and assign the menu you wish to display and assign it to the possition you created by renaming the default Menu to maximenu_position_name (whatever you choose for the name)

TemplateDetails.xml set the option for the position drop down, it should look like this:
<positions>
<position settings="">search</position>
<position settings="">logo</position>
<position settings="">logo-small</position>
<position settings="">menu</position>
<position settings="">maximenuck</position>
<position settings="">toolbar-l</position>
<position settings="">toolbar-r</position>
<position settings="">headerbar</position>
<position settings="">breadcrumbs</position>

Template.php will set the position in the template, I have these changes:
<div class="tm-page">

<?php if ($this->count('logo + headerbar + maximenuck + search')) : ?>
<nav class="tm-navbar uk-navbar">

<?php if ($this->count('search')) : ?>
<div class="uk-navbar-flip uk-visible-large">
<div class="uk-navbar-content"><?php echo $this->render('search'); ?></div>
</div>
<?php endif; ?>

<?php if ($this->count('maximenuck')) : ?>
<div class="uk-navbar-flip">
<?php echo $this->render('maximenuck'); ?>
</div>
<?php endif; ?>
The following user(s) said Thank You: DaffRider

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 8 months ago #21580
Use firebug or Chrome Dev tools (f12) and have a look at
www.rppeo.ca

Good luck
The following user(s) said Thank You: DaffRider

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

Replied by DaffRider on topic Replace Yootheme Menu with Maximenu CK

Posted 9 years 8 months ago #21581
Hi nsheehan123

Thx for your help

this a portion of code of the ORIGINAL template
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 + search')) : ?> <nav class="tm-navbar uk-navbar uk-navbar-attached"> <?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('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> <?php endif; ?>

i found solution for have 2 options original menu and MaxiMenuCK

if module MaxiMenuCK enable, display OK

thx for your help i have test but sometime i have white page :( im not php dev :unsure:
Last Edit:9 years 8 months ago by DaffRider
Last edit: 9 years 8 months ago by DaffRider.

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

Replied by DaffRider on topic Replace Yootheme Menu with Maximenu CK

Posted 9 years 8 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 6 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 6 months ago by nsheehan123
Last edit: 9 years 6 months ago by nsheehan123.

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

Time to create page: 0.796 seconds

Fast and powerful creation, customizable and responsive.

Read More

We have 963 guests and 2 members online