2

I call custom phtml in product.info.details but it's not working.

How I call:

<referenceBlock name="product.info.details">
    <block class="Magento\Framework\View\Element\Template" name="test_file" template="Magento_Theme::html/header/test.phtml"/>
</referenceBlock>
2

Try this

<?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>
      <referenceContainer name="content">
        <container name="custom.container" before="product.info.details">
            <block class="Magento\Framework\View\Element\Template" name="blockname" template="Vendor_Module::path/yourfile.phtml"/>
        </container>
      </referenceContainer>
    </body>
</page>
  • No I don't want to custom tab i need to remove that tab insted of that i call custom phtml – Magento 2 May 19 '17 at 10:16
  • Where you want to display your custom phtml file in product page? – Prince Patel May 19 '17 at 10:20
  • Before product.info.details – Magento 2 May 19 '17 at 10:21
  • Try my updated answer and let me know if not working. – Prince Patel May 19 '17 at 10:26
  • I want to full width like product.info.details – Magento 2 May 19 '17 at 10:31

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.