I have added multiple referenceBlocks in the default.xml file for the Magento theme. Which I thought would work but it appears it will only ever show which ever is last in the XML file. (i.e. if I swap custom.home to be before customer.header then the header element would show, and vise versa).
Note the order only makes a difference in default.xml not home.xml (the layout file). Can I have multiple reference blocks or am I missing something?
default.xml
<!-- Removed blocks -->
<referenceBlock name="catalog.compare.sidebar" remove="true" />
<referenceBlock name="top.search" remove="true" />
<referenceBlock name="top.links" remove="true" />
<referenceBlock name="header.container" remove="true" />
<referenceBlock name="navigation.sections" remove="true" />
<referenceBlock name="footer" remove="true" />
<!-- Add custom blocks -->
<referenceBlock name="custom.header">
<container name="globalheader" htmlTag="div" htmlClass="globalheader">
<block class="Magento\Framework\View\Element\Template" name="row" template="Magento_Theme::html/globalheader.phtml">
</block>
</container>
</referenceBlock>
<referenceBlock name="custom.home">
<container name="homehtml" htmlTag="div" htmlClass="htmlHome">
<block class="Magento\Framework\View\Element\Template" name="row" template="Magento_Theme::html/home.phtml">
</block>
</container>
</referenceBlock>
Home.xml
<referenceContainer name="main.content" remove="true" />
<referenceContainer name="content" remove="true" />
<referenceContainer name="page.wrapper">
<container name="custom.header" as="custom_header_container" label="Page Header Container" before="main.content"/>
<container name="custom.home" as="custom_home_container" label="Route for Static HTML Page" />
</referenceContainer>
</layout>