Skip to main content
Tweeted twitter.com/StackMagento/status/805375912963346432
added 2 characters in body; edited tags
Source Link

I need to wrap all my content in a div. I'm trying to add a container w/o any success. I created a child theme and a custom-home.xmlcustom-home.xml config file as follow:

<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_layout.xsd">
<update handle="empty"/>

    <container name="panel" as="panel" label="panel" htmlTag="div" htmlClass="panel" htmlId="panel" after="body">
        <referenceContainer name="page.wrapper">
            <container name="ves-slideshow" as="ves-slideshow" label="Page Slideshow Container" htmlTag="div" htmlClass="ves-slideshow clearfix" before="main.content"/>
        </referenceContainer>
    </container>

</layout>

the container with name="panel" does not show up. What am I misunderstading?

I need to wrap all my content in a div. I'm trying to add a container w/o any success. I created a child theme and a custom-home.xml config file as follow:

<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_layout.xsd">
<update handle="empty"/>

    <container name="panel" as="panel" label="panel" htmlTag="div" htmlClass="panel" htmlId="panel" after="body">
        <referenceContainer name="page.wrapper">
            <container name="ves-slideshow" as="ves-slideshow" label="Page Slideshow Container" htmlTag="div" htmlClass="ves-slideshow clearfix" before="main.content"/>
        </referenceContainer>
    </container>

</layout>

the container with name="panel" does not show up. What am I misunderstading?

I need to wrap all my content in a div. I'm trying to add a container w/o any success. I created a child theme and a custom-home.xml config file as follow:

<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_layout.xsd">
<update handle="empty"/>

    <container name="panel" as="panel" label="panel" htmlTag="div" htmlClass="panel" htmlId="panel" after="body">
        <referenceContainer name="page.wrapper">
            <container name="ves-slideshow" as="ves-slideshow" label="Page Slideshow Container" htmlTag="div" htmlClass="ves-slideshow clearfix" before="main.content"/>
        </referenceContainer>
    </container>

</layout>

the container with name="panel" does not show up. What am I misunderstading?

Source Link
davideghz
  • 693
  • 2
  • 11
  • 28

Magento 2 - wrap everything in a div

I need to wrap all my content in a div. I'm trying to add a container w/o any success. I created a child theme and a custom-home.xml config file as follow:

<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_layout.xsd">
<update handle="empty"/>

    <container name="panel" as="panel" label="panel" htmlTag="div" htmlClass="panel" htmlId="panel" after="body">
        <referenceContainer name="page.wrapper">
            <container name="ves-slideshow" as="ves-slideshow" label="Page Slideshow Container" htmlTag="div" htmlClass="ves-slideshow clearfix" before="main.content"/>
        </referenceContainer>
    </container>

</layout>

the container with name="panel" does not show up. What am I misunderstading?