Skip to content

Instantly share code, notes, and snippets.

@vasilii-b
Last active January 14, 2021 23:58
Show Gist options
  • Save vasilii-b/1947fd38c9b8822ff82e2d85d9e83723 to your computer and use it in GitHub Desktop.
Save vasilii-b/1947fd38c9b8822ff82e2d85d9e83723 to your computer and use it in GitHub Desktop.
Adding an empty container in Magento 2 layout file
<container name="some.container" htmlTag="div" htmlClass="container">
<!-- Force container to render -->
<block class="Magento\Framework\View\Element\Text">
<arguments>
<argument name="text" xsi:type="string"><![CDATA[&nbsp;]]></argument>
</arguments>
</block>
</container>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment