I'm trying to add a block to a template built from scratch. Using template-hints I can see that in the footer the following template is rendered
app/design/frontend/Merchant/merchant/Magento_Theme/templates/html/footer-cms.phtml
with some search I fount that the template is configured in app/design/frontend/Merchant/merchant/Magento_Theme/page_layout/1column.xml
:
<?xml version="1.0"?>
<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_layout.xsd">
<!-- REMOVE MAGENTO HEADER & FOOTER -->
<referenceContainer name="header.container" remove="true"/>
<referenceContainer name="footer-container" remove="true"/>
<referenceContainer name="page.top" remove="true" />
<!-- INCLUDES TYPO3 HEADER & FOOTER -->
<referenceContainer name="page.wrapper">
<block class="Magento\Framework\View\Element\Template" name="t3header" as="t3header"
before="main.content"
template="Magento_Theme::html/header-cms.phtml"/>
<block class="Magento\Framework\View\Element\Template" name="t3footer" as="t3footer"
before="before.body.end"
template="Magento_Theme::html/footer-cms.phtml"/>
</referenceContainer>
</layout>
as I would like to add a newsletter subscription and terms checkbox in the footer, I am trying to do it in app/code/Myvendor/Newsletter/view/frontend/layout/1column.xml
but it doesn't show up even after clearing the cache and I can't figure out why
<?xml version="1.0"?>
<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_layout.xsd">
<referenceContainer name="t3footer">
<block class="Magento\Framework\View\Element\Template" name="wf.newsletter2" as="wf.newsletter2"
before="-"
template="Myvendor_Newsletter::newsletterprivacy.phtml"/>
</referenceContainer>
</layout>
I've also tried to put it in the shop/app/code/Myvendor/Newsletter/view/frontend/layout/default.xml
<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceBlock name="footer_links">
<block class="Magento\Framework\View\Element\Template" name="wf.newsletter" as="wf.newsletter"
before="-"
template="Myvendor_Newsletter::newsletterprivacy.phtml"/>
</referenceBlock>
</body>
</page>
but nothing happened
Can someone help please?