When you add a new widget you can specify a layout update container.

enter image description here

I want to create a custom container that inserts the widget into a tab on the product page. If the tab is empty then hide it.

I have the following in my catalog_product_view.xml

<referenceBlock name="product.info.details">
      <container name="my-custom-tab" label="Custom Tab" htmlTag="div" htmlClass="custom-tab">
      <block class="Magento\Catalog\Block\Product\View" name="custom.tab" as="customtab" group="detailed_info" >
            <argument translate="true" name="title" xsi:type="string">Custom Tab</argument>
            <argument name="at_label" xsi:type="string">none</argument>

The above almost works in a sense that it appears as a selectable container but then nothing is shown on the front end.

I can't be far off so I'm hoping that someone can help with this last bit please?

  • Anyone able to help? :( – Ordog Aug 12 '18 at 9:42

Your Answer

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

Browse other questions tagged or ask your own question.