예제 #1
0
    protected function renderItem(JoomlaRokMenuNode &$item, RokMenuNodeTree &$menu)
    {
        ?>
        <li <?php if ($item->hasListItemClasses()) : ?>class="<?php echo $item->getListItemClasses(); ?>"<?php endif; ?> <?php if ($item->hasCssId() && $this->args['roknavmenu_fusion_enable_current_id']): ?>id="<?php echo $item->css_id; ?>"<?php endif; ?>>
        <?php if ($item->getType() == 'menuitem') : ?>
        <a <?php if ($item->hasLinkClasses()): ?>class="<?php echo $item->getLinkClasses(); ?>"<?php endif; ?> <?php if ($item->hasLink()): ?>href="<?php echo $item->getLink(); ?>"<?php endif; ?> <?php if ($item->hasTarget()): ?>target="<?php echo $item->getTarget(); ?>"<?php endif; ?> <?php if ($item->hasAttribute('onclick')): ?>onclick="<?php echo $item->getAttribute('onclick'); ?>"<?php endif; ?><?php if ($item->hasLinkAttribs()): ?> <?php echo $item->getLinkAttribs(); ?><?php endif; ?>>
    <?php if ($item->hasImage()): ?>
            <img alt="<?php echo $item->getAlias; ?>" src="<?php echo $item->getImage(); ?>"/><?php endif; ?>
        <span><?php echo $item->getTitle();?></span>
            </a>
    <?php elseif ($item->getType() == 'separator') : ?>
        <span <?php if ($item->hasLinkClasses()): ?>class="<?php echo $item->getLinkClasses(); ?> nolink"<?php endif; ?>>
                <span><?php echo $item->getTitle();?></span>
            </span>
    <?php endif; ?>
        <?php if ($item->hasChildren()): ?>
        <ul class="level<?php echo intval($item->getLevel()) + 2; ?>">
            <?php foreach ($item->getChildren() as $child) : ?>
    <?php $this->renderItem($child, $menu); ?>
    <?php endforeach; ?>
            </ul>
    <?php endif; ?>
        </li>
        <?php

    }
예제 #2
0
    protected function renderItem(JoomlaRokMenuNode &$item, &$menu)
    {
        ?>
        <li <?php if ($item->hasListItemClasses()) : ?>class="<?php echo $item->getListItemClasses(); ?>"<?php endif; ?> <?php if (null != $item->getCssId()): ?>id="<?php echo $item->getCssId(); ?>"<?php endif; ?>>
        <?php if ($item->getType() == 'menuitem') : ?>
        <a <?php if ($item->hasLinkClasses()): ?>class="<?php echo $item->getLinkClasses(); ?>"<?php endif; ?> <?php if ($item->hasLink()): ?>href="<?php echo $item->getLink(); ?>"<?php endif; ?> <?php if (null != $item->getTarget()): ?>target="<?php echo $item->getTarget(); ?>"<?php endif; ?> <?php if ($item->hasLinkAttribs()): ?> <?php echo $item->getLinkAttribs(); ?><?php endif; ?>>
    <?php if (null != $item->getImage()): ?>
                <img alt="<?php echo $item->getAlias();?>" src="<?php echo $item->getImage();?>"/><?php endif; ?>
        <span <?php if ($item->hasSpanClasses()): ?>class="<?php echo $item->getSpanClasses(); ?>"<?php endif; ?>><?php echo $item->getTitle();?></span>
            </a>
    <?php elseif ($item->getType() == 'separator') : ?>
        <span <?php if ($item->hasSpanClasses()): ?>class="<?php echo $item->getSpanClasses(); ?>"<?php endif; ?>><?php echo $item->getTitle();?></span>
    <?php endif; ?>
        <?php if ($item->hasChildren()): ?>
        <ul>
                <?php foreach ($item->getChildren() as $child) : ?>
    <?php $this->renderItem($child, $menu); ?>
    <?php endforeach; ?>
        </ul>
    <?php endif; ?>
        </li>
        <?php

    }