0
こんにちは私はモジュールファイルからgallery.phtml
ファイルを上書きする必要があるモジュールをビルドしています。このためカスタムモジュールのMagento2にgallery.phtmlファイルを書き込む
私はコンテンツ
<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.media.image" remove="true"/>
<referenceContainer name="product.info.media">
<block class="Magento\Catalog\Block\Product\View\Gallery" name="product.info.media.image" template="product/view/gallery.phtml"/>
</referenceContainer>
</body>
</page>
次が、それは、ここからファイルをレンダリングしていないと私たちのモジュールレイアウトフォルダにcatalog_product_view.xmlを作成しています。 <referenceBlock name="product.info.media.image" remove="true"/>
をfalseに設定すると、ベースイメージのレンダリングが開始されます。
私が間違っていることをお勧めします。