I've created a custom module that holds a simple phtml file, block class to include elements into the phtml file and a default.xml within my Module/view/frontend/layout.
However I am struggling to add my phtml to my page using the default.xml within my module, however I can add this using the default.xml within my theme.
Heres the contents of my xml within my module:
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
<body>
<referenceBlock name="autosmart.logo" remove="true"/>
<referenceContainer name="header.container">
<block class="Autosmart\DistributorSearch\Block\DistributorSearch" name="distributor.search" template="distributor-search.phtml"></block>
</referenceContainer>
</body>
</page>
Do I need to do anything to use this module default.xml rather than having to add my phtml to the page using my theme default.xml?