0

Hi I want to reposition the static block that I set on Display Setting under a specific category. I want the static block below the category grid view.

This is my code

<layout>
  <CATEGORY_49>
    <reference name="product_list_toolbar" >
        <action method="setData"><data>_current_grid_mode</data><mode>grid</mode></action>
    </reference>
    <reference name="product_list">
        <action method="setColumnCount"><count>5</count></action>
    </reference>
  </CATEGORY_49>
</layout>

How can I do that?

1

I got the answer guys. Just want to share it

<reference name="content">
  <block type="cms/block" name="Get started today with Office 365" after="-">
   <action method="setBlockId"><id>microsoft_office_365</id></action>
  </block>
</reference>
1
  • Please mark this as accepted. – Marius Nov 11 '14 at 9:07
0

You cannot do that from the layout.
You need to edit the catalog/category/view.phtml file.
Replace

<?php elseif($this->isMixedMode()): ?>
    <?php echo $this->getCmsBlockHtml() ?>
    <?php echo $this->getProductListHtml() ?>

with

<?php elseif($this->isMixedMode()): ?>
    <?php echo $this->getProductListHtml() ?>
    <?php echo $this->getCmsBlockHtml() ?>

But this will change it for all the categories.
If you want for a single category, read this: Position Static Block under Category Grid

4
  • Thanks Marius but I already answer my own question hehe through XML code also. :) – Alyssa Reyes Sep 3 '14 at 11:31
  • @AlyssaReyes. Ok that will work, but in that case you don't use the block you select in the Display Settings tab. But I guess it's ok. – Marius Sep 3 '14 at 11:32
  • oh I see. I'll try your code. But I need the content under the category listing ONLY IN GRID VIEW. Is that possible on your code? – Alyssa Reyes Sep 3 '14 at 11:43
  • With the code I provided is not possible, but you can read the view mode I think and change the code I provided based on the value of the view mode. – Marius Sep 3 '14 at 11:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.