Skip to content

Instantly share code, notes, and snippets.

@DuaelFr
Created September 25, 2013 15:42
Show Gist options
  • Save DuaelFr/6701579 to your computer and use it in GitHub Desktop.
Save DuaelFr/6701579 to your computer and use it in GitHub Desktop.
<?php if ($main_menu): ?>
<div id="main-menu" class="navigation">
<?php print theme('links__system_main_menu', array(
'links' => $main_menu,
'attributes' => array(
'id' => 'main-menu-links',
'class' => array('links', 'clearfix'),
),
'heading' => array(
'text' => t('Main menu'),
'level' => 'h2',
'class' => array('element-invisible'),
),
)); ?>
</div> <!-- /#main-menu -->
<?php endif; ?>
function THEME_preprocess_html(&$variables) {
$variables['main_menu'] = theme_get_setting('toggle_main_menu') ? menu_main_menu() : array();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment