|
47 | 47 | "data": <?= /* @escapeNotVerified */ $block->getGalleryImagesJson() ?>,
|
48 | 48 | "options": {
|
49 | 49 | "nav": "<?= /* @escapeNotVerified */ $block->getVar("gallery/nav") ?>",
|
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' ?>, |
| 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; ?> |
55 | 65 | "width": "<?= /* @escapeNotVerified */ $block->getImageAttribute('product_page_image_medium', 'width') ?>",
|
56 | 66 | "thumbwidth": "<?= /* @escapeNotVerified */ $block->getImageAttribute('product_page_image_small', 'width') ?>",
|
57 | 67 | <?php if ($block->getImageAttribute('product_page_image_small', 'height') || $block->getImageAttribute('product_page_image_small', 'width')): ?>
|
|
69 | 79 | "transitionduration": <?= /* @escapeNotVerified */ $block->getVar("gallery/transition/duration") ?>,
|
70 | 80 | <?php endif; ?>
|
71 | 81 | "transition": "<?= /* @escapeNotVerified */ $block->getVar("gallery/transition/effect") ?>",
|
72 |
| - "navarrows": <?= /* @escapeNotVerified */ $block->getVar("gallery/navarrows") ? 'true' : 'false' ?>, |
| 82 | + <?php if (($block->getVar("gallery/navarrows"))): ?> |
| 83 | + "navarrows": <?= /* @escapeNotVerified */ $block->getVar("gallery/navarrows") ?>, |
| 84 | + <?php endif; ?> |
73 | 85 | "navtype": "<?= /* @escapeNotVerified */ $block->getVar("gallery/navtype") ?>",
|
74 | 86 | "navdir": "<?= /* @escapeNotVerified */ $block->getVar("gallery/navdir") ?>"
|
75 | 87 | },
|
76 | 88 | "fullscreen": {
|
77 | 89 | "nav": "<?= /* @escapeNotVerified */ $block->getVar("gallery/fullscreen/nav") ?>",
|
78 |
| - "loop": <?= /* @escapeNotVerified */ $block->getVar("gallery/fullscreen/loop") ? 'true' : 'false' ?>, |
| 90 | + <?php if ($block->getVar("gallery/fullscreen/loop")): ?> |
| 91 | + "loop": <?= /* @escapeNotVerified */ $block->getVar("gallery/fullscreen/loop") ?>, |
| 92 | + <?php endif; ?> |
79 | 93 | "navdir": "<?= /* @escapeNotVerified */ $block->getVar("gallery/fullscreen/navdir") ?>",
|
80 |
| - "navarrows": <?= /* @escapeNotVerified */ $block->getVar("gallery/fullscreen/navarrows") ? 'true' : 'false' ?>, |
| 94 | + <?php if ($block->getVar("gallery/transition/navarrows")): ?> |
| 95 | + "navarrows": <?= /* @escapeNotVerified */ $block->getVar("gallery/fullscreen/navarrows") ?>, |
| 96 | + <?php endif; ?> |
81 | 97 | "navtype": "<?= /* @escapeNotVerified */ $block->getVar("gallery/fullscreen/navtype") ?>",
|
82 |
| - "arrows": <?= /* @escapeNotVerified */ $block->getVar("gallery/fullscreen/arrows") ? 'true' : 'false' ?>, |
83 |
| - "showCaption": <?= /* @escapeNotVerified */ $block->getVar("gallery/fullscreen/caption") ? 'true' : 'false' ?>, |
| 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; ?> |
84 | 104 | <?php if ($block->getVar("gallery/fullscreen/transition/duration")): ?>
|
85 | 105 | "transitionduration": <?= /* @escapeNotVerified */ $block->getVar("gallery/fullscreen/transition/duration") ?>,
|
86 | 106 | <?php endif; ?>
|
|
0 commit comments