Magento – Magento 2.2.2 : Move Category Navigation Section

categorymagento2

How to move category navigation section after home page banner in magento 2.2
class="sections nav-sections"

and my current site link in magento 2.2 and link and screen short please check

solivr.mobilegiz.com

please check magento 1.9 site link and screen short

www.solivr.fr

please advance help for thanks.

Best Answer

You can not move your banner if you have added your banner in admin cms homepage.

You have to create and call a custom phtml file and then add your banner in that file.

Create following file

app/code/Vendor/Module/view/frontend/layout/cms_index_index.xml

<?xml version="1.0"?>

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceContainer name="page.top">
            <block class="Magento\Framework\View\Element\Template" name="homepage.banner" before="navigation.sections" template="Vendor_Module::homepage_banner.phtml" />
        </referenceContainer>
    </body>
</page>

Create following file and add your banner here

app/code/Vendor/Module/view/frontend/templates/homepage_banner.phtml

<?php

echo "Add your banner here";
Related Topic