Closed
Description
I've got a custom theme with a custom page layout (home
):
<?xml version="1.0" encoding="UTF-8" ?>
<page_layouts xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../lib/internal/Magento/Framework/View/PageLayout/etc/layouts.xsd">
<layout id="home">
<label translate="true">Home</label>
</layout>
</page_layouts>
home.xml
:
<?xml version="1.0" encoding="UTF-8" ?>
<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/page_layout.xsd" />
In app/design/Vendor/theme/Magento_Theme/layout/default.xml
I have:
<?xml version="1.0" encoding="UTF-8" ?>
<page layout="home" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../../lib/internal/Magento/Framework/View/Layout/etc/page_configuration.xsd" />
However when I visit the CMS home page (which has custom layout set to home
), it pulls through elements from app/code/Magento/Theme/view/frontend/layout/default.xml
, with an error log like:
main.INFO: Broken reference: the 'currency' element cannot be added as child to 'header.panel', because the latter doesn't exist [] []
main.INFO: Broken reference: the 'currency' tries to reorder itself towards 'store_language', but their parents are different: 'header.panel' and '' respectively. [] []
The only way I can get my app/design/Vendor/theme/Magento_Theme/layout/default.xml
to work is to comment out app/code/Magento/Theme/view/frontend/layout/default.xml
, which defeats the whole purpose of a custom page layout.
The aim is to get an empty page layout; in Magento 1 this was easy, but in Magento 2 this seems either impossible, or if it's possible, it appears undocumented.