SwissUpLabs Logo

Change page layout

Notice

This tutorial assumes that you already created custom theme based on one of Argento themes.

If you did not — go ahead, it will take 15 minutes.

Let’s change category page layout to 3columns and product layout to 2columns with right sidebar.

  1. Create catalog_category_view.xml and catalog_product_view.xml files in the following directory:

    app/design/frontend/Local/argento-[essence|flat]-custom/Magento_Catalog/layout
    
  2. Add the following content to catalog_category_view.xml file and save it.

    <?xml version="1.0"?>
    <page layout="3columns" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    </page>
    
  3. Add the following content catalog_product_view.xml file and save it.

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

Clear Magento cache to see the result:

Edit this Page