Browse Source

enable extension on CMS pages too

master
Matthias Niess 7 years ago
parent
commit
3cae6f2721
  1. 15
      view/frontend/layout/cms_page_view.xml
  2. 5
      view/frontend/web/js/productheight.js

15
view/frontend/layout/cms_page_view.xml

@ -0,0 +1,15 @@
<?xml version="1.0"?>
<!--
/**
* Copyright © 2013-2017 Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceContainer name="content">
<block class="Magento\Cms\Block\Page" name="cms_page"/>
<block class="Magento\Framework\View\Element\Template" name="yumdap.productheight" template="Yumdap_ProductHeight::productheight.phtml" />
</referenceContainer>
</body>
</page>

5
view/frontend/web/js/productheight.js

@ -6,8 +6,9 @@ define([
return { return {
productheight: function() { productheight: function() {
$('.product-items').each(function() { $('.product-items').each(function() {
$(this).children('').matchHeight(); $(this).find('.product-item-name').matchHeight();
$(this).find('.price-box').matchHeight();
}); });
} }
} }
}); });

Loading…
Cancel
Save