The layout system in Magento 2 is driving me crazy. Could anybody please help me to understand it?
I have the following
<referenceContainer name="header-wrapper"> <container name="header-wrapper" before="top.search"> <block class="MagentoFrameworkViewElementTemplate" name="test" template="Magento_Theme::html/custom.phtml" /> </container> </referenceContainer>
The expected outcome was to insert
custom.phtml is in
Here is a screenshot with the block names:
So I expected the new block to be on the left side of “top.search”
Here is the actual outcome:
It’s driving me crazy. I tried the whole day but I don’t understand the layout system of Magento 2.
Could anybody help me?