2016-06-19, 23:23:13
create component 'menu'
in a template, use the following code
Code:
<?php
$s = array('current', 'activepath', 'currentpath', 'open');
$r = array('active', 'active', 'active', 'parent');
$c = str_replace($s, $r, $item->classes);
?>
<?php if ($item->isOpen) { ?>
<li class="<?php echo $c; ?> deeper">
<a class="color2" href="<?php echo htmlspecialchars($item->link); ?>">
<span class="menutitle">
<?php echo htmlspecialchars($item->text); ?>
</span> <span class="menudesc"></span><i class="icon-angle-down"></i>
</a>
<ul class="sub-menu">
<?php $item->outputChildren(); ?>
</ul>
</li>
<?php } else { ?>
<li class="<?php echo $c; ?>">
<a class="color1" href="<?php echo htmlspecialchars($item->link); ?>">
<span class="menutitle"><?php echo htmlspecialchars($item->text); ?> <span class="menudesc"></span>
</a>
</li>
<?php } ?>
Code:
<ul><?php get_i18n_navigation(return_page_slug(),0,99, I18N_SHOW_MENU, 'menu'); ?></ul>