Showing results for 
Search instead for 
Did you mean: 

Custom Magento 2 page layouts

Custom Magento 2 page layouts

 We are planing to create a custom theme that will have no shop at first stage. We are going to have a home, a static page and a contact.


We have removed from layout\default.xml all referenceBlock we don't want. We are now trying to accomplish 2 page_layouts, one for homepage and one for contact page using empty handle. The homepage-layout will have a slider on the top (and slider.js script) and contactpage-layout will have a google maps (and google script to load).


What is the best approach to do that?? Can someone provide an example of this?


Thank you



Re: Custom Magento 2 page layouts

Hi @stzachristas,

I guess the solution will depend on what you want and which changes you'll apply in the future.

Maybe the simple way could be:


  • If the page with Google Maps will show some Contact information, you should use the Contact module and customize to add the maps (there are several 3rd-party modules that allows you to do that).
  • If you don't show a Contact Form, the most simplier way should be a CMS page (maybe harder to maintain because you'll add javascript + html but it will work).
If you've found one of my answers useful, please give "Kudos" or "Accept as Solution"