Submit a enquiry






    Back to all posts

    Custom page templates in Magento2

    Guide
    by James Holloway Partnership Director

    If you need a custom page template in Magento2, outside the standard 1column, 2column-left templates, you can make one quite easily by adding a layout.xml in your Magento2 theme.

    Download the code here.

    You will see as follows:

    • xml (this defines the new template, in this case, a new homepage template)
    • page_layout/custom_home.xml (this is the layout for the new template, here you can see we have added a .phtml template which can be used if needed)
    • templates/html/home.phtml (this is the custom .phtml template if needed).

    If you would like further info drop me a call on 0161 398 0303 or an email ([email protected]) and I can send you more code examples etc.