I want to know the difference between <container>
and <referenceContainer>
for layout file.
Thank you in advance!
Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It only takes a minute to sign up.
Sign up to join this communityContainer: A structure without content that holds other layout elements such as blocks and containers.
referenceBlock and referenceContainer:
Updates in <referenceBlock>
and <referenceContainer>
are applied to the corresponding <block>
or <container>
.
For example, if you make a reference by <referenceBlock name="right">
, you are targeting the block <block name="right">
.
To pass parameters to a block use the <argument></argument>
instruction.
Container
A structure without content that holds other layout elements such as blocks and containers.
A container renders child elements during view output generation. It can be empty or it can contain an arbitrary set of <container>
and <block>
elements.
referenceContaine
Updates in <referenceContainer>
are applied to the corresponding <container>
.
In otherwork we can said that, if you want make any changes into the particular Container
at that time you can use there refrence.