1

In template of module product-video. Widget productGallery called by data-mage-init attribute with template option pass through

<div id="<?php /* @escapeNotVerified */ echo $block->getHtmlId() ?>"
 class='gallery'
 data-mage-init='{"productGallery":{"template":"#<?php
 /* @escapeNotVerified */ echo $block->getHtmlId() ?>-template"}}'
 data-images="<?php /* @escapeNotVerified */ echo $block->escapeHtml($block->getImagesJson()) ?>"
 data-types="<?php /* @escapeNotVerified */ echo $block->escapeHtml(
     $this->helper('Magento\Framework\Json\Helper\Data')->jsonEncode($block->getImageTypes())
 ) ?>"
> 
   CONTENT 
</div>

My question is how to implement in right way to creat simple multiple upload images. Do i really need getImageTypes like original code. I don't want use all image type

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.