File tree Expand file tree Collapse file tree 1 file changed +19
-18
lines changed
view/frontend/templates/widget Expand file tree Collapse file tree 1 file changed +19
-18
lines changed Original file line number Diff line number Diff line change 1
1
<?php
2
- $ categories = $ this ->getCategoryCollection ();
3
- $ canShowImg = $ this ->canShowImage ();
4
- $ title = $ block ->getTitle () ? __ ($ block ->getTitle ()) : 'Categories ' ;
2
+ $ categories = $ this ->getCategoryCollection ();
3
+ $ canShowImg = $ this ->canShowImage ();
4
+ $ title = $ block ->getTitle () ? __ ($ block ->getTitle ()) : '' ;
5
5
?>
6
- <?php if ($ title ):?>
7
- <div class="block-title">
8
- <strong><?php echo $ block ->escapeHtml ($ title ) ?> </strong>
9
- </div>
6
+ <?php if ($ title ): ?>
7
+ <div class="block-title">
8
+ <strong><?php echo $ block ->escapeHtml ($ title ) ?> </strong>
9
+ </div>
10
10
<?php endif ?>
11
11
<ul class="block-content catalog-category">
12
- <?php foreach ($ categories as $ category ):?>
12
+ <?php foreach ($ categories as $ category ): ?>
13
13
<li class="category">
14
- <a href="<?php echo $ block ->escapeUrl ($ category ->getUrl ()) ?> ">
15
- <?php if ($ canShowImg && $ category ->getImageUrl ()):?>
16
- <img src="<?php echo $ block ->escapeUrl ($ category ->getImageUrl ()) ?> " alt="" width="<?= $ this ->getImageWidth ();?> " height="<?= $ this ->getImageHeight ()?> "/>
17
- <?php else :?>
18
- <span class="cat-title"><?php echo $ block ->escapeHtml ($ category ->getName ()) ?> </span>
19
- <?php endif ;?>
20
- </a>
14
+ <a href="<?php echo $ block ->escapeUrl ($ category ->getUrl ()) ?> ">
15
+ <?php if ($ canShowImg && $ category ->getImageUrl ()): ?>
16
+ <img src="<?php echo $ block ->escapeUrl ($ category ->getImageUrl ()) ?> " alt=""
17
+ width="<?= $ this ->getImageWidth (); ?> " height="<?= $ this ->getImageHeight () ?> "/>
18
+ <?php else : ?>
19
+ <span class="cat-title"><?php echo $ block ->escapeHtml ($ category ->getName ()) ?> </span>
20
+ <?php endif ; ?>
21
+ </a>
21
22
</li>
22
- <?php
23
- endforeach ;
24
- ?>
23
+ <?php
24
+ endforeach ;
25
+ ?>
25
26
</ul>
You can’t perform that action at this time.
0 commit comments