I'm trying to add a new container into root.
I've tried placing the code to empty.xml
, default.xml
, 1column.xml
.
I've checked with changing another element in the same file if the file is loaded and parsed.
But whatever I do I just can't add the container.
This is the code:
<referenceContainer name="root">
<referenceContainer name="header.container" htmlId="header"/>
<container name="header.container.mobile" as="header_container_mobile" label="Page Mobile Header Container" htmlTag="header" htmlId="header_mobile" htmlClass="navbar navbar-fixed-top" after="header.container"/>
</referenceContainer>
So it will add the html id "header" to the "header.container" which appears as <header ...>
in the page. (I have moved this container to root elsewhere).
But it doesn't add the container "header.container.mobile". (I have tried other names too)
How can I add the container?
header.container
in the core file of Magento_Themehtdocs/vendor/magento/module-theme/view/frontend/page_layout/1column.xml
it still does not appear, even though adding another class to the footer in the same file does appear...