cancel
Showing results for 
Search instead for 
Did you mean: 

i have a question, please !

i have a question, please !

How to add ID attribute to gallery images?

Hi,

 

I need to add ID attribute to images on a product page, like this:

<img id="" href=

I can do this if I modify 

lib/web/fotorama/fotorama.js

How can I do this the right way?

I created

<My Module>/<Name>/web/js/test.js

and in require-config.js I added this:

var config = {    map: {
        '*': {            myTest: 'js/test'
        }
    }
};

And file test.js I have this:

 

define([
    'jquery',
    'jquery/ui',
    'catalogGallery'
], function($){

   
});

What now?

 

I searched this forum and stackexchange for the similar topics but few I found, like this one:

http://magento.stackexchange.com/questions/105219/magento-2-override-gallery-html-file-from-vendor-magento-magento2-base-lib-web

was not answered.

1 REPLY 1

Re: i have a question, please !

Hi @cvgh_bvhcbv 

 

Are you using any theme?

 

 

Thanks

Selva

if issue solved,Click Kudos & Accept as Solution
Thanks
SelvaKumar