<?php /** @var \Blackbird\MenuManager\Block\NodeType\Category $block */?>
<?php if ($block->getStatus()):?>
    <li class="<?= implode(' ', $block->getClasses()) ?>">
        <a href=<?= $block->getData('url')?> class="<?= implode(' ', $block->getClasses()) ?>" target=<?=$block->getTarget() ?> role="menuitem">
            <span><?= $block->getTitle()?></span>
        </a>

        <?php if (!empty($block->getSubmenu())):?>
            <ul class="level<?=$block->getLevel() ?> submenu">
                <li class="category-menu-title"><?= $block->getTitle()?></li>
                <?php foreach ($block->getSubmenu() as $value):?>
                    <li><?= $value['name'] ?></li>
                <?php endforeach; ?>
                <?= $block->getData('children') ?>
            </ul>
        <?php endif;?>
    </li>
<?php endif;?>


