Creating a layout update container for a widget that displays in a tab - Magento 2

by Ordog   Last Updated August 08, 2018 17:09 PM

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="">
      <container name="my-custom-tab" label="Custom Tab" htmlTag="div" htmlClass="custom-tab">
      <block class="Magento\Catalog\Block\Product\View" name="" 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?

Related Questions

CE 1.9 - CSS class for CMS Page Layout update

Updated June 29, 2015 18:04 PM

Magento 2 - Updating Product list page Layout

Updated April 06, 2018 11:09 AM

Duplicate product/view tabs element in Magento 2

Updated March 13, 2017 15:09 PM