Magento2 – Change Product Page Layout from Admin

layoutmagento-2.1

I am working on a Magento 2.1.7 shop and I have created a child-theme of Magento Blank.

I've changed the layout of my homepage to 2 columns with left bar from Content -> Pages. I need to do the same for the product page.

As can be seen in the image below, I don't have this option for the product page:

enter image description here

Can I enable changing this layout from Content -> Pages? If not is there an alternative (best way) to get the same result?

Thank you!

Best Answer

For product page layout change there is no option in admin (unless you want it for a particular product, for that you can choose layout in edit product page under design tab), you can do it using xml file. Follow below to change layout using xml

Copy catalog_product_view.xml from vendor\magento\module-catalog\view\frontend\layout to your theme.

and in this file you can change layout in below code

<page layout="2columns-left" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">

</page>
Related Topic