diff --git a/CHANGELOG.md b/CHANGELOG.md index 024a84cc3..f7c19dd55 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,9 @@ All notable changes to this project will be documented in this file. ## [Released] +## [2.17.0] - 2021-03-30 +### Added +- images in snowdog menu desktop template (#70218), compatible with `snowdog/module-menu` version `2.14.0` ## [2.16.0] - 2021-03-24 ### Updated diff --git a/Snowdog_Menu/templates/main-desktop/menu/node_type/category.phtml b/Snowdog_Menu/templates/main-desktop/menu/node_type/category.phtml index 089198167..e9dfb879a 100644 --- a/Snowdog_Menu/templates/main-desktop/menu/node_type/category.phtml +++ b/Snowdog_Menu/templates/main-desktop/menu/node_type/category.phtml @@ -5,7 +5,8 @@ $categoryUrl = $block->getCategoryUrl($nodeId); $categoryUrl = $categoryUrl ?: '#'; $dataAttribute = ''; - + $imageUrl = $block->getImageUrl(); + $imageAltText = $block->getImageAltText(); $classLink = $block->getIsRoot() ? $class . '__link' : $class . '__inner-link'; $title = $block->getTitle(); @@ -25,3 +26,12 @@ > escapeHtml($title) ?> + + + <?= $block->escapeHtmlAttr($imageAltText); ?> + diff --git a/Snowdog_Menu/templates/main-desktop/menu/node_type/custom_url.phtml b/Snowdog_Menu/templates/main-desktop/menu/node_type/custom_url.phtml index 0cff80a4a..66283fa61 100644 --- a/Snowdog_Menu/templates/main-desktop/menu/node_type/custom_url.phtml +++ b/Snowdog_Menu/templates/main-desktop/menu/node_type/custom_url.phtml @@ -4,6 +4,8 @@ $class = $block->getMenuClass(); $classLink = $block->getIsRoot() ? $class . '__link' : $class . '__inner-link'; $title = $block->getTitle(); + $imageUrl = $block->getImageUrl(); + $imageAltText = $block->getImageAltText(); if ($block->getId()) { $attributes[] = 'data-menu="menu-' . $block->getId() . '"'; } @@ -20,3 +22,11 @@ > escapeHtml($title) ?> + + <?= $block->escapeHtmlAttr($imageAltText); ?> +