I using a theme in Magento 2.1.7. In my category page I am having 2-column-left layout with this I am getting this look of my category page given in the
Image-1
I want this look in my category page given in Image-2
Where I need to change for this? If I am changing in my 1 column page_layout then it is affecting my home page also. Any Help?
2 Answers 2
Please refer this link
Please add below code in your Layout Update Xml section of your category settings in admin panel.
<move element="your.static.block.name" destination="page.top" before="breadcrumbs"/>
Create static block and add image, don't forget to change the element attribute value with the value of your block name.
-
if this help you dont forgot to mark as accepted answer so it will help other too.Mage2 Developer– Mage2 Developer2017年09月27日 10:41:54 +00:00Commented Sep 27, 2017 at 10:41
I am writing this answer for the proper understanding of layout .xml file & how it is working
Go to the catalog_category_view.xml file in your own theme at the location magento_root\app\design\frontend\Package\themename\Magento_Catalog\layout & add the below code because it is working with the both the below given code
Code 1
<move element="your.static.block.name" destination="page.top" before="-"/>
Code 2
<move element="your.static.block.name" destination="page.top" before="breadcrumbs"/>
Note: If you are not able to see the changes run the below command
php bin/magento cache:flush
- Make sure whatever changes you wanted put it in last of the .xml file before
</page>- If you are using a third party theme then for your changes make your custom theme & inherit that third party theme so that you can update your third party theme regularly & easily without trouble
Explore related questions
See similar questions with these tags.