Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
left.phtml
Go to the documentation of this file.
1 <?php
7 // @codingStandardsIgnoreFile
8 
14 ?>
15 <?php if (!$block->getCategory()) {
16  return;
17 } ?>
18 <?php $_categories = $block->getCurrentChildCategories(); ?>
19 <?php $_count = is_array($_categories) ? count($_categories) : $_categories->count(); ?>
20 <?php if ($_count): ?>
21  <div class="block filter">
22  <div class="title">
23  <strong><?= /* @escapeNotVerified */ __('Shop By') ?></strong>
24  </div>
25  <div class="content">
26  <strong class="subtitle"><?= /* @escapeNotVerified */ __('Shopping Options') ?></strong>
27  <dl class="options" id="narrow-by-list2">
28  <dt><?= /* @escapeNotVerified */ __('Category') ?></dt>
29  <dd>
30  <ol class="items">
31  <?php ?>
32  <?php foreach ($_categories as $_category): ?>
33  <?php if ($_category->getIsActive()): ?>
34  <li class="item">
35  <a href="<?= /* @escapeNotVerified */ $block->getCategoryUrl($_category) ?>"<?php if ($block->isCategoryActive($_category)): ?> class="current"<?php endif; ?>><?= $block->escapeHtml($_category->getName()) ?></a>
36  <span class="count"><?= /* @escapeNotVerified */ $_category->getProductCount() ?></span>
37  </li>
38  <?php endif; ?>
39  <?php endforeach ?>
40  </ol>
41  </dd>
42  </dl>
43  </div>
44  </div>
45 <?php endif; ?>
foreach( $this->main as $item) endforeach
Definition: side-menu.phtml:10
__()
Definition: __.php:13
$block
Definition: block.php:8
endif
Definition: left.phtml:36
if(! $block->getCategory()) $_categories
Definition: left.phtml:18
$_category
Definition: image.phtml:19
$_count
Definition: left.phtml:19