view.phtml 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. // @codingStandardsIgnoreFile
  7. ?>
  8. <?php
  9. /**
  10. * Category layered navigation
  11. *
  12. * @var $block \Magento\LayeredNavigation\Block\Navigation
  13. */
  14. ?>
  15. <?php if ($block->canShowBlock()): ?>
  16. <div class="block filter">
  17. <div class="block-title filter-title">
  18. <strong><?= /* @escapeNotVerified */ __('Shop By') ?></strong>
  19. </div>
  20. <div class="block-content filter-content">
  21. <?= $block->getChildHtml('state') ?>
  22. <?php if ($block->getLayer()->getState()->getFilters()): ?>
  23. <div class="block-actions filter-actions">
  24. <a href="<?= /* @escapeNotVerified */ $block->getClearUrl() ?>" class="action clear filter-clear"><span><?= /* @escapeNotVerified */ __('Clear All') ?></span></a>
  25. </div>
  26. <?php endif; ?>
  27. <?php $wrapOptions = false; ?>
  28. <?php foreach ($block->getFilters() as $filter): ?>
  29. <?php if (!$wrapOptions): ?>
  30. <strong role="heading" aria-level="2" class="block-subtitle filter-subtitle"><?= /* @escapeNotVerified */ __('Shopping Options') ?></strong>
  31. <dl class="filter-options" id="narrow-by-list">
  32. <?php $wrapOptions = true; endif; ?>
  33. <?php if ($filter->getItemsCount()): ?>
  34. <dt role="heading" aria-level="3" class="filter-options-title"><?= $block->escapeHtml(__($filter->getName())) ?></dt>
  35. <dd class="filter-options-content"><?= /* @escapeNotVerified */ $block->getChildBlock('renderer')->render($filter) ?></dd>
  36. <?php endif; ?>
  37. <?php endforeach; ?>
  38. <?php if ($wrapOptions): ?>
  39. </dl>
  40. <?php endif; ?>
  41. </div>
  42. </div>
  43. <?php endif; ?>