Skip to content

Commit 12554bb

Browse files
ENGCOM-2555: Fix broken commit in #15040 that accidentally reverted previous changes. #16594
- Merge Pull Request #16594 from gwharton/magento2:2.2-develop-16580 - Merged commits: 1. a012c45
2 parents c8c2791 + a012c45 commit 12554bb

File tree

1 file changed

+10
-30
lines changed
  • app/code/Magento/Catalog/view/frontend/templates/product/view

1 file changed

+10
-30
lines changed

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

+10-30
Original file line numberDiff line numberDiff line change
@@ -47,21 +47,11 @@
4747
"data": <?= /* @escapeNotVerified */ $block->getGalleryImagesJson() ?>,
4848
"options": {
4949
"nav": "<?= /* @escapeNotVerified */ $block->getVar("gallery/nav") ?>",
50-
<?php if (($block->getVar("gallery/loop"))): ?>
51-
"loop": <?= /* @escapeNotVerified */ $block->getVar("gallery/loop") ?>,
52-
<?php endif; ?>
53-
<?php if (($block->getVar("gallery/keyboard"))): ?>
54-
"keyboard": <?= /* @escapeNotVerified */ $block->getVar("gallery/keyboard") ?>,
55-
<?php endif; ?>
56-
<?php if (($block->getVar("gallery/arrows"))): ?>
57-
"arrows": <?= /* @escapeNotVerified */ $block->getVar("gallery/arrows") ?>,
58-
<?php endif; ?>
59-
<?php if (($block->getVar("gallery/allowfullscreen"))): ?>
60-
"allowfullscreen": <?= /* @escapeNotVerified */ $block->getVar("gallery/allowfullscreen") ?>,
61-
<?php endif; ?>
62-
<?php if (($block->getVar("gallery/caption"))): ?>
63-
"showCaption": <?= /* @escapeNotVerified */ $block->getVar("gallery/caption") ?>,
64-
<?php endif; ?>
50+
"loop": <?= /* @escapeNotVerified */ $block->getVar("gallery/loop") ? 'true' : 'false' ?>,
51+
"keyboard": <?= /* @escapeNotVerified */ $block->getVar("gallery/keyboard") ? 'true' : 'false' ?>,
52+
"arrows": <?= /* @escapeNotVerified */ $block->getVar("gallery/arrows") ? 'true' : 'false' ?>,
53+
"allowfullscreen": <?= /* @escapeNotVerified */ $block->getVar("gallery/allowfullscreen") ? 'true' : 'false' ?>,
54+
"showCaption": <?= /* @escapeNotVerified */ $block->getVar("gallery/caption") ? 'true' : 'false' ?>,
6555
"width": "<?= /* @escapeNotVerified */ $block->getImageAttribute('product_page_image_medium', 'width') ?>",
6656
"thumbwidth": "<?= /* @escapeNotVerified */ $block->getImageAttribute('product_page_image_small', 'width') ?>",
6757
<?php if ($block->getImageAttribute('product_page_image_small', 'height') || $block->getImageAttribute('product_page_image_small', 'width')): ?>
@@ -79,28 +69,18 @@
7969
"transitionduration": <?= /* @escapeNotVerified */ $block->getVar("gallery/transition/duration") ?>,
8070
<?php endif; ?>
8171
"transition": "<?= /* @escapeNotVerified */ $block->getVar("gallery/transition/effect") ?>",
82-
<?php if (($block->getVar("gallery/navarrows"))): ?>
83-
"navarrows": <?= /* @escapeNotVerified */ $block->getVar("gallery/navarrows") ?>,
84-
<?php endif; ?>
72+
"navarrows": <?= /* @escapeNotVerified */ $block->getVar("gallery/navarrows") ? 'true' : 'false' ?>,
8573
"navtype": "<?= /* @escapeNotVerified */ $block->getVar("gallery/navtype") ?>",
8674
"navdir": "<?= /* @escapeNotVerified */ $block->getVar("gallery/navdir") ?>"
8775
},
8876
"fullscreen": {
8977
"nav": "<?= /* @escapeNotVerified */ $block->getVar("gallery/fullscreen/nav") ?>",
90-
<?php if ($block->getVar("gallery/fullscreen/loop")): ?>
91-
"loop": <?= /* @escapeNotVerified */ $block->getVar("gallery/fullscreen/loop") ?>,
92-
<?php endif; ?>
78+
"loop": <?= /* @escapeNotVerified */ $block->getVar("gallery/fullscreen/loop") ? 'true' : 'false' ?>,
9379
"navdir": "<?= /* @escapeNotVerified */ $block->getVar("gallery/fullscreen/navdir") ?>",
94-
<?php if ($block->getVar("gallery/transition/navarrows")): ?>
95-
"navarrows": <?= /* @escapeNotVerified */ $block->getVar("gallery/fullscreen/navarrows") ?>,
96-
<?php endif; ?>
80+
"navarrows": <?= /* @escapeNotVerified */ $block->getVar("gallery/fullscreen/navarrows") ? 'true' : 'false' ?>,
9781
"navtype": "<?= /* @escapeNotVerified */ $block->getVar("gallery/fullscreen/navtype") ?>",
98-
<?php if ($block->getVar("gallery/fullscreen/arrows")): ?>
99-
"arrows": <?= /* @escapeNotVerified */ $block->getVar("gallery/fullscreen/arrows") ?>,
100-
<?php endif; ?>
101-
<?php if ($block->getVar("gallery/fullscreen/caption")): ?>
102-
"showCaption": <?= /* @escapeNotVerified */ $block->getVar("gallery/fullscreen/caption") ?>,
103-
<?php endif; ?>
82+
"arrows": <?= /* @escapeNotVerified */ $block->getVar("gallery/fullscreen/arrows") ? 'true' : 'false' ?>,
83+
"showCaption": <?= /* @escapeNotVerified */ $block->getVar("gallery/fullscreen/caption") ? 'true' : 'false' ?>,
10484
<?php if ($block->getVar("gallery/fullscreen/transition/duration")): ?>
10585
"transitionduration": <?= /* @escapeNotVerified */ $block->getVar("gallery/fullscreen/transition/duration") ?>,
10686
<?php endif; ?>

0 commit comments

Comments
 (0)