Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
create template with dropdown menues
#2
create component 'menu'
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 } ?>
in a template, use the following code
Code:
<ul><?php get_i18n_navigation(return_page_slug(),0,99, I18N_SHOW_MENU, 'menu'); ?></ul>
Reply


Messages In This Thread
create template with dropdown menues - by phpman - 2016-06-19, 22:38:21
RE: create template with dropdown menues - by Oleg06 - 2016-06-19, 23:23:13



Users browsing this thread: 1 Guest(s)