skip to Main Content

I am using Magento 2 on the Porto Theme and I am trying to edit the following file to get the category description to display below the products and I just cant solve it.

http://www.paulo19.sg-host.com/folding-tables/wooden-trestle-tables-cat/

Can anyone help.

Thank you

    <?xml version="1.0"?>
<!--
/**
 * Copyright © 2018 Porto. All rights reserved.
 */
-->
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="2columns-left" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceContainer name="page.top">
             <block class="MagentoCatalogBlockCategoryView" name="category_banner" template="category/banner.phtml" ifconfig="porto_settings/category/category_description" before="-"/>
        </referenceContainer>
        <referenceContainer name="content">
            <block class="MagentoCatalogBlockCategoryView" name="category_desc_main_column" template="category/desc_main_column.phtml" ifconfig="porto_settings/category/category_description" before="category.products"/>
        </referenceContainer>
        <move element="category.image" destination="content" before="category_desc_main_column"/>
        <referenceContainer name="sidebar.main">
            <block class="SmartwavePortoBlockTemplate" name="category_view_custom_block" after="-" template="Magento_Catalog::category/custom_block.phtml"/>
        </referenceContainer>
    </body>
</page>

2

Answers


  1. Chosen as BEST ANSWER

    Well after looking at this for some time, finally got it.

    In directory (suggest to use child theme but here is core location) /app/design/frontend/Smartwave/porto/Magento_Catalog/layout/catalog_category_view.xml

    <?xml version="1.0"?>
    

        </referenceContainer>
        <referenceContainer name="content">
            <block class="MagentoCatalogBlockCategoryView" name="category_desc_main_column" template="category/desc_main_column.phtml" ifconfig="porto_settings/category/category_description" before="category.products"/>
            <block class="MagentoCatalogBlockCategoryView" name="category_banner" template="category/banner.phtml" ifconfig="porto_settings/category/category_description" after="category.products"/>
        </referenceContainer>
    
        <move element="category.image" destination="content" before="category_desc_main_column"/>
        <referenceContainer name="sidebar.main">
            <block class="SmartwavePortoBlockTemplate" name="category_view_custom_block" after="-" template="Magento_Catalog::category/custom_block.phtml"/>
        </referenceContainer>
    </body>
    


  2. Same theme but I had to do this.

    /app/design/frontend/Smartwave/porto/Magento_Catalog/layout/catalog_category_view.xml

    <move element="category.description" destination="content" after="category.products.list"/>
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search