Jason P.
Jason P.

Reputation: 409

Magento 2 Porto Theme Move Category Description Below Products

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="Magento\Catalog\Block\Category\View" name="category_banner" template="category/banner.phtml" ifconfig="porto_settings/category/category_description" before="-"/>
        </referenceContainer>
        <referenceContainer name="content">
            <block class="Magento\Catalog\Block\Category\View" 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="Smartwave\Porto\Block\Template" name="category_view_custom_block" after="-" template="Magento_Catalog::category/custom_block.phtml"/>
        </referenceContainer>
    </body>
</page>

Upvotes: 1

Views: 2024

Answers (3)

TonyMerlin
TonyMerlin

Reputation: 1

In the latest version of Porto template this is how i've made it work...

<move element="category.description.default" destination="content" after="category.products"/>

Upvotes: 0

Mark
Mark

Reputation: 11

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"/>

Upvotes: 0

Jason P.
Jason P.

Reputation: 409

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="Magento\Catalog\Block\Category\View" name="category_desc_main_column" template="category/desc_main_column.phtml" ifconfig="porto_settings/category/category_description" before="category.products"/>
        <block class="Magento\Catalog\Block\Category\View" 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="Smartwave\Porto\Block\Template" name="category_view_custom_block" after="-" template="Magento_Catalog::category/custom_block.phtml"/>
    </referenceContainer>
</body>

Upvotes: 2

Related Questions