I am trying to create a custom page layout for my theme which is a child of Magento Blank theme. I got the folder structure like this

File: app/design/frontend/Company/themename/Magento_Theme/layouts.xml

  <?xml version="1.0" encoding="UTF-8"?>
    <page_layouts xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"        
        <layout id="myfullwidth">
            <label translate="true">Full Width Layout</label>

File: app/design/frontend/Company/themename/Magento_Theme/page_layout/myfullwidth.xml

<?xml version="1.0"?>
<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    <update handle="empty"/>
    <referenceContainer name="page.wrapper">
        <container name="header.container" as="header_container" label="Page Header Container"  htmlTag="header" htmlClass="page-header" before="main.content"/>
        <container name="page.top" as="page_top" label="After Page Header" after="header.container"/>
        <container name="footer-container" as="footer" before="before.body.end" label="Page Footer Container" htmlTag="footer" htmlClass="page-footer" />

I am able to see and select the layout in admin area.

However, when I come back to view the page, it displays a blank page. When I view source code of the page, there is nothing inside the body tag.

When I move the the file myfullwidth.xml to vendor/magento/module-themne/view/frontend/page_layout/myfullwidth.xml then it works fine.

Look like Magento didn't recognize the file when I place it under the page_layout folder in my theme folder. Anyone knows what have I done wrong? Thank you for your help in advance.

P/S: I have cleared cache and run setup:status-content:deploy but it doesn't make any different.

  • Hi. I've got the exact same issue. Any luck solving it? – sulman May 8 '17 at 10:22
  • Unfortunately not but I have solved my problem using block. I inserted a block right after the menu to display full-width content – Ty Trinh May 30 '17 at 0:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.