Keyword

Get all the child categories, how to ?

  • Aimery Marsily
  • Aimery Marsily's Avatar Topic Author
  • Offline
  • Premium Member
More
12 years 6 months ago #63435 by Aimery Marsily
Get all the child categories, how to ? was created by Aimery Marsily
Hi,

I'm developping a module that help me displaying the items with best votes. The problem is that I want to compare all the items in a category that contain sub-categories... So I watched the mod_k2_tools and use the function HasChild and GetCategorieChild, but I was wondering if K2 already incluse a better way to do it (get all the items from a category and it's sub-categories) ?

This is my code to get all the categories and subs, from the given $id :
Log in  or Create an account to join the conversation.