0

I’m trying to set up a static block for my categories. I created a phtml file, then linked this file to the static block I created:

{{block type="catalog/navigation" template="catalog/navigation/sub_navigation.phtml"}}

Then I went the Cataglog->Manage Categories and selected"Static Block Only” under Display Setting->Display mode. I selected the static block I just created.

However, when I navigate to that category on my site, it just displays the regular category view (the layout I created under template->category->view.phtml in my template folder).

Any idea what I’m doing wrong here? I tried re-indexing everything, to no avail.

1

First test with anything else, remove the {{block}} from the CMS block and write something in it, does it work?

If no

then you have a problem with the view of ANY block. Check your app/design/frontend/<base>/<default>/template/catalog/category/view.phtml for this entry:

<?php if($this->isContentMode()): ?>
    <?php echo $this->getCmsBlockHtml() ?>

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

<?php else: ?>
    <?php echo $this->getProductListHtml() ?>
<?php endif; ?>

If yes

Something with your block is wrong or with the template. Check the template and the system.log for errors

  • Thank you! With your help, I've made some progress. I added your code in my view.phtml file. Now, instead of the category list, I get a blank page (save for the title). When I specify a DIFFERENT static block (just some footer links), it works (displays the footer links). When I replace all of the php code in the sub_navigation.phtml file with just a "hey there", it still doesn't display it (which makes me think there's something wrong with the specified path to file, rather than the file itself). I will continue to research. – Christina Huggins Ramey Mar 18 '14 at 15:52
  • Ah -- I had to delete the "name" attribute I had added to the {{block... code (when I was trying out different tactics to get it to work). It's working now...thanks! – Christina Huggins Ramey Mar 18 '14 at 16:02

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.