Magento Extensions Rating 2024
EXTENSIONS BY CATEGORY
B2B (Business-To-Business)
Blog
Customer
ERP (Enterprise Resource Planning)
Mega Menu
One Step Checkout
Order
POS (Point Of Sale)
Search
Shopping Cart
Sitemap
SEO
Social
Stock & Inventory Management
EXTENSIONS BY DEVELOPER
aheadWorks
Amasty
Boost My Shop
BSS Commerce
Magestore
MageWorx
Mirasvit
Templates Master
Wyomind
XTENTO
Magento 2 Documentation
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
vendor
magento
module-catalog
view
frontend
templates
category
image.phtml
Go to the documentation of this file.
1
<?php
7
// @codingStandardsIgnoreFile
8
9
?>
10
<?php
16
?>
17
<?php
18
$_helper
= $this->helper(
'Magento\Catalog\Helper\Output'
);
19
$_category
=
$block
->getCurrentCategory();
20
$_imgHtml
=
''
;
21
if
($_imgUrl =
$_category
->getImageUrl()) {
22
$_imgHtml
=
'<div class="category-image"><img src="'
. $_imgUrl .
'" alt="'
.
$block
->escapeHtml(
$_category
->getName()) .
'" title="'
.
$block
->escapeHtml(
$_category
->getName()) .
'" class="image" /></div>'
;
23
$_imgHtml
=
$_helper
->categoryAttribute(
$_category
,
$_imgHtml
,
'image'
);
24
/* @escapeNotVerified */
echo
$_imgHtml
;
25
}
26
?>
$block
$block
Definition:
block.php:8
$_helper
$_helper
Definition:
image.phtml:18
$_category
$_category
Definition:
image.phtml:19
$_imgHtml
$_imgHtml
Definition:
image.phtml:20