Jump to content

$category->id not working when smarty cache enabled


mammoo

Recommended Posts

I wanted to amend the categories block to only output the categories from within the category currently being viewed. I added

 

{if $child.id==$category->id_parent || $child.id==$category->id}

 

to the blockcategories.tpl file around the category output and this does what I want.

 

My problem is that if I enable Smary caching in the performance tab this stops working. Both $category->id_parent and $category->id are blank when caching is enabled.

 

Does anyone know why this is and how you can get around it?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...