Skip to main content

How to customize Hyvä templates

Perform additional manual customizations for Hyvä-based theme templates to achieve the full compatibility of all features provided by the Mirasvit Layered Navigation extension.

Product attribute linking

In case you'd like to use the Product attribute linking feature in your Hyvä theme you may see that the links contain HTML tags.

PAL with html

Attributes list as HTML elements

To fix it, you need to modify the template file Magento_Catalog/templates/product/view/product-info.phtml in your theme.

Product Attribute Linking before

Elements to modify

In this template file find the <div id="product-details"> element
Remove part <?=/* @noEscape */ $attribute['value'] ?: "" ?>
Replace line <?= $escaper->escapeHtml($value) ?> with <?= $value ?>

Product Attribute Linking before

Code after modification

tip

Replacing <?= $escaper->escapeHtml($value) ?> with <?= $escaper->escapeHtml($value, ['a']) ?> is not recommended as $escaper->escapeHtml() will remove all attributes from the <a> tag except the href attribute.