<?php $megaMenu = $this->getMegamenuItems(); ?>
<?php $megaMenuContent = $this->getMegamenuItemsContent(); ?>
<?php $helper = $this->helper('MGS\Mmegamenu\Helper\Data') ?>
<?php if (count($megaMenu) > 0): ?>
    <ul id="vertical-menu-<?php echo $this->getMenuId() ?>" class="vertical-menu nav nav-pills nav-main <?php echo $this->getCustomClass(); ?>">
		<?php foreach ($megaMenu as $item): ?>
			<li class="<?php echo $this->getClass($item) ?>">
                <?php if(isset($megaMenuContent['id-'.$item->getMegamenuId()])): ?>
                    <?php echo $helper->generateContentFilter($megaMenuContent['id-'.$item->getMegamenuId()]->getHtml()); ?>
                <?php endif ?>
			</li>
		<?php endforeach ?>
    </ul>
<?php endif ?>