0

I'd like to add a new tab on the product view page to show the gallery of images inside this tab.

enter image description here

1 Answer 1

1

Complement your custom theme with this code below, so will show up a new tab with your image gallery with all features.

File

app/design/frontend/[Package]/[theme]/Magento_Catalog/layout/catalog_product_view.xml

Code

<?xml version="1.0"?>
<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="product.info.details">
            <block class="Magento\Catalog\Block\Product\View\Gallery" name="product.gallery" template="Magento_Catalog::product/view/gallery.phtml" group="detailed_info">
                <arguments>
                    <argument translate="true" name="title" xsi:type="string">Gallery</argument>
                </arguments>
            </block>
        </referenceBlock>
    </body>
</page>

Result

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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