Skip to content

Commit 18d3296

Browse files
author
Gil Greenberg
committed
Add support for fotorama 'thumbmargin' setting within a theme's view.xml
<vars module="Magento_Catalog"> <var name="gallery"> <var name="thumbmargin">16</var> </var> </var>
1 parent 4d26093 commit 18d3296

File tree

1 file changed

+3
-0
lines changed
  • app/code/Magento/Catalog/view/frontend/templates/product/view

1 file changed

+3
-0
lines changed

app/code/Magento/Catalog/view/frontend/templates/product/view/gallery.phtml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,9 @@
6868
"thumbheight": <?php /* @escapeNotVerified */ echo $block->getImageAttribute('product_page_image_small', 'height')
6969
?: $block->getImageAttribute('product_page_image_small', 'width'); ?>,
7070
<?php endif; ?>
71+
<?php if (($block->getVar("gallery/thumbmargin"))): ?>
72+
"thumbmargin": <?php echo $block->getVar("gallery/thumbmargin"); ?>,
73+
<?php endif; ?>
7174
<?php if ($block->getImageAttribute('product_page_image_medium', 'height') || $block->getImageAttribute('product_page_image_medium', 'width')): ?>
7275
"height": <?php /* @escapeNotVerified */ echo $block->getImageAttribute('product_page_image_medium', 'height')
7376
?: $block->getImageAttribute('product_page_image_medium', 'width'); ?>,

0 commit comments

Comments
 (0)