1

When the breakpoint is single everything works fine, when I try to add one more breakpoint, it doesn't work. Here is my code from view.xml. So firstly I need to display nav as vertical thumbs, next break as horizontal and last as dots.

enter image description here

0

Try this Solution working fine for me change code in XML file your-theme/etc/view.xml

<var name="breakpoints">
<var name="mobile">
    <var name="conditions">
        <var name="max-width">767px</var>
    </var>
    <var name="options">
        <var name="options">
            <var name="nav">dots</var>
        </var>
    </var>
</var>
<var name="tablet">
    <var name="conditions">
        <var name="min-width">768px</var>
        <var name="max-width">900px</var>
    </var>
    <var name="options">
        <var name="options">
            <var name="navdir">horizontal</var>
        </var>
    </var>
</var>

and also change the line in your-theme/web/mage/gallery/gallery.js

settings.api.updateOptions(settings.defaultConfig.options, true); 

to

if(window.innerWidth > 767) {
                                settings.api.updateOptions(settings.defaultConfig.options, true);
                            }

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.