0

I would like the user to be sent to the category landing page when the user clicks the category in layered navigation.

So instead of the user getting /category.html?cat=11, they would get /category/RedWidget.html?cat=11 when they click the RedWidget category.

I found this link, but his code doesn't work.

Thanks ahead of time!

Joe Mastey
  • 26,809
  • 13
  • 80
  • 104
AntoNB
  • 175
  • 1
  • 3
  • 12

2 Answers2

3

If I understand you correctly, I came across a similar problem. My eventual fix was to display both the left.phtml and layered navigation at the same time, then hide the category in layered navigation. (if($showBlock && $this->__($_filter->getName()) != "Category"):)

Then in left.phtml I parsed the $_GET variable and appended it to the end of the URL string for each category, ensuring that the layered navigation search terms persisted between categories.

Slightly dirty but it does the job.

Petet
  • 466
  • 5
  • 11
  • You're the man! However, I already bit the bullet and went with the Layered Navigation Pro module... it seems a bit more intuitive! – AntoNB Dec 07 '10 at 20:50
  • http://www.aitoc.com/en/magentomods_layered_navigation_pro.html – AntoNB Dec 07 '10 at 20:50
  • I actually purchased this extension before deciding it wasn't actually suitable for what I needed. Using Layered Navigation Pro means that everything is loaded via ajax and you don't get the google indexing of your top level and sub level category pages. If Aitoc brought out a none ajax version of Layered Navigation Pro it would be amazing! I've already mentioned it to them so hopefully... :) – Petet Dec 09 '10 at 14:51
  • Petet, anyway I can get you to post the code? I'd like the implement this. – AntoNB Dec 28 '10 at 00:38
1

Category landing pages are usually defined in the same place where you created the category. Set the display mode to CMS block or CMS block + products and you should see your content displayed for the user.

If this isn't what you are expecting, please elaborate on what you are using as a "category landing page".

Joe Mastey
  • 26,809
  • 13
  • 80
  • 104
  • Let's say I have 3 sub-categories, they all have CMS blocks. If a user is on the main-category and clicks any of the sub-categories in the layered navigation, the above happens. – AntoNB Aug 11 '10 at 21:14
  • Try setting the subcategories as anchors. That may do the trick. – Joe Mastey Aug 12 '10 at 14:07
  • Oh, i have no issue with the categories showing up. My issue is with the category links in the Layered Navigation not actually linking to the category pages. – AntoNB Aug 12 '10 at 22:48