Jump to content

How to determine if a category has subcategories?


Recommended Posts

hi, on my site: http://harveys.blueplanetdns.com/harveys-shop/

 

I have categories and sub categories, I would like to be able to define weather a category has sub categories so that I can replicate the homepage and show fading banners and category images like on the shop landing page.

 

but if I go in and edit teh category.tpl page it will mess up the product page?!

 

Please help

Link to comment
Share on other sites

the category object has functions called getSubCategories and getChildren, which could be used to determine if the "current" category has sub categories.

 

in fact, the category.tpl already does a subcategory check, so if "this" category has subcategories, then they are shown.

{if isset($subcategories)}

 

but if I go in and edit teh category.tpl page it will mess up the product page?!

if you do not know what you are doing, possibly.

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...