0

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

enter image description here

I want this look in my category page given in Image-2

enter image description here

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?

asked Sep 27, 2017 at 10:20
0

2 Answers 2

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.

Abhishek Tripathi
2,9152 gold badges21 silver badges38 bronze badges
answered Sep 27, 2017 at 10:33
1
  • if this help you dont forgot to mark as accepted answer so it will help other too. Commented Sep 27, 2017 at 10:41
0

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
answered Nov 10, 2017 at 7:36

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.