Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
filter.phtml
Go to the documentation of this file.
1 <?php
7 // @codingStandardsIgnoreFile
8 
9 ?>
10 <?php
16 ?>
17 
18 <ol class="items">
19  <?php foreach ($filterItems as $filterItem): ?>
20  <li class="item">
21  <?php if ($filterItem->getCount() > 0): ?>
22  <a href="<?= $block->escapeUrl($filterItem->getUrl()) ?>">
23  <?= /* @escapeNotVerified */ $filterItem->getLabel() ?>
24  <?php if ($this->helper('\Magento\Catalog\Helper\Data')->shouldDisplayProductCountOnLayer()): ?>
25  <span class="count"><?= /* @escapeNotVerified */ $filterItem->getCount() ?><span class="filter-count-label">
26  <?php if ($filterItem->getCount() == 1):?> <?= /* @escapeNotVerified */ __('item') ?><?php else:?> <?= /* @escapeNotVerified */ __('items') ?><?php endif;?></span></span>
27  <?php endif; ?>
28  </a>
29  <?php else:?>
30  <?= /* @escapeNotVerified */ $filterItem->getLabel() ?>
31  <?php if ($this->helper('\Magento\Catalog\Helper\Data')->shouldDisplayProductCountOnLayer()): ?>
32  <span class="count"><?= /* @escapeNotVerified */ $filterItem->getCount() ?><span class="filter-count-label">
33  <?php if ($filterItem->getCount() == 1):?><?= /* @escapeNotVerified */ __('item') ?><?php else:?><?= /* @escapeNotVerified */ __('items') ?><?php endif;?></span></span>
34  <?php endif; ?>
35  <?php endif; ?>
36  </li>
37  <?php endforeach ?>
38 </ol>
foreach( $this->main as $item) endforeach
Definition: side-menu.phtml:10
endif
Definition: filter.phtml:27
__()
Definition: __.php:13