2

I have made some changes to the layout using local.xml. With the original sample products and category data that I used to test the site the product listing page works as I want it to. I recently got some more sample product and category data and the changes don't seem to work with these. One example is the top.links. In my local.xml I have

  <catalog_category_default>        
    <remove name="top.links" />
    <remove name="left.reports.product.viewed" />
    <remove name="catalog.leftnav" />
    <reference name="root">
        <action method="setTemplate"><template>page/1column.phtml</template></action>
    </reference>
</catalog_category_default>

This removes the toplinks for pages containing the original products but not with the new ones. There are no layout updates set in the db for the new products and categories. The templates are also coming from the correct theme. It just looks like my custom layout file is not able to render certain changes.

In addition to the toplinks, the layered navigation is not displaying but I think it is probably the same issue.

3
  • what is the layout handle used for this? Commented Aug 22, 2014 at 11:20
  • my terminology isn't brilliant so if i misunderstand you please let me know. I've added the full catalog section that I'm using in my local.xml. Commented Aug 22, 2014 at 11:39
  • no that is exactly what I wanted to see :) Commented Aug 22, 2014 at 11:40

1 Answer 1

2

There are two types of categories, non-anchor and anchor categories.

Each on of these have a different layout handle. Your code appears to only be using the non-anchor version, if you are dealing with anchor categories you will also need to use the handle catalog_category_layered.

You can check if a category is an anchor category via the category manage section of the admin page.

With regards to the filters not showing that is because you are removing the section that contains the filters.

<remove name="catalog.leftnav" />

If you want to move the block try using unsetChild and insert

4
  • brilliant. This stops the toplinks displaying twice. I guess i was incorrect in thinking the filters not displaying was related. I think your answer deserves accepting but if you could suggest anything i can try for the filters that would be great :) Commented Aug 22, 2014 at 11:45
  • @ThomasRyan what is the display mode for these categories? It should be set via the admin. Commented Aug 22, 2014 at 11:49
  • I set them to use parent settings. I then set the parents to anchor but this didn't work. Initially they had the same settings as the categories that displayed the filters Commented Aug 22, 2014 at 11:50
  • @ThomasRyan you are removing the filter block in your xml Commented Aug 22, 2014 at 11:53

Your Answer

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

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