Forum Discussion

MarekOCLC's avatar
2 years ago

Wrap multiple component in a div with class in Quilt / page xml view

In my page quilt / in Studio > Page > my page > XML view, I would like to put two components in the same div, something like the following:

 

<quilt layout="two-column.main-side" nestable="false">
  <add to="main-content">
    <div class="my-class">
      <component id="theme-lib.tiled-node-navigation"/>
      <component id="custom_content_2"/>
    </div>
    <component id="theme-lib.community-activity"/>
  </add>
</quilt>

 

 

I inserted a div where I would like to wrap the two components - however, when I try to save it gives me an error. Is there a way to accomplish putting just these two components in the same div but still be in the "main-content"? Is there any other work around? 

  • Try with wrapper!

     

    <quilt layout="two-column.main-side" nestable="false">
      <add to="main-content">
        <component id="theme-lib.tiled-node-navigation" wrapper="my-class"/>
        <component id="custom_content_2" wrapper="my-class"/>
        <component id="theme-lib.community-activity"/>
      </add>
    </quilt>
  • Try with wrapper!

     

    <quilt layout="two-column.main-side" nestable="false">
      <add to="main-content">
        <component id="theme-lib.tiled-node-navigation" wrapper="my-class"/>
        <component id="custom_content_2" wrapper="my-class"/>
        <component id="theme-lib.community-activity"/>
      </add>
    </quilt>