I've create a custom layout for static page into Magento 2.
app/design/frontend/VENDOR/THEME/Magento_Cms/layouts.xml
<page_layouts xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/PageLayout/etc/layouts.xsd">
<layout id="customer-service">
<label translate="true">customer-service</label>
</layout>
</page_layouts>
app/design/frontend/VENDOR/THEME/Magento_Cms/page_layout/customer-service-layout.xml
<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_layout.xsd">
<update handle="1column"/>
<referenceContainer name="content">
</referenceContainer></layout>
Now I can select my layout into Design ->Layout of my Static Page but into my frontend, I have a blank white page.
Information:
- It doesn't even work if I put my layout code in the Magento_Theme module
- If I select another layout of my page everything works properly.
- The frontend page doesn't go to 404 page but an empty page with class cms-page-view page-layout-customer-service in the body tag
Can you help me, please?
Best Answer
Add Code
Create New File under