![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/old/vendor/magefan/module-blog/view/frontend/templates/sidebar/ |
<?php /** * Copyright © Magefan ([email protected]). All rights reserved. * Please visit Magefan.com for license details (https://magefan.com/end-user-license-agreement). * * Glory to Ukraine! Glory to the heroes! */ ?> <?php /** * Blog sidebar categories template * * @var $block \Magefan\Blog\Block\Sidebar\Categories */ ?> <?php $items = $block->getGroupedChilds(); ?> <?php if (count($items)) { ?> <div class="widget block block-categories" data-bind="scope: 'categories'"> <div class="block-title"> <strong><?= $block->escapeHtml(__('Categories')) ?></strong> </div> <ul class="accordion" id="accordion-2"> <?php $level = 0; $first = true; foreach ($items as $item) { $newLevel = $item->getLevel(); if ($level == $newLevel && !$first) { echo '</li>'; } if ($level < $newLevel) { echo '<ul>'; } if ($level > $newLevel) { for ($i = $level; $i > $newLevel; $i--) { echo '</ul></li>'; } } ?> <li> <a title="<?= $block->escapeHtml($item->getTitle()) ?>" href="<?= $block->escapeUrl($item->getCategoryUrl()) ?>"> <?= $block->escapeHtml($item->getTitle()) ?> </a> <?php if ($block->showPostsCount()) { ?> (<?= $block->escapeHtml($item->getPostsCount()) ?>) <?php } ?> <?php $level = $newLevel; $first = false; } ?> </ul> </div> <?php } ?>