Keyword

K2 » Itemlist / Category ... How to show sub sub categories

  • Ahmad Arshad
  • Ahmad Arshad's Avatar Topic Author
  • Offline
  • New Member
More
14 years 1 month ago #86701 by Ahmad Arshad
Hi,
I have just installed K2, gone through the tutorials... and well... kinda stuck on one place. 

Basically I am trying to use a K2 >> Itemlist / Category to show products that we are selling...

In back end I have something like:

Products
 > SubCategory1
> SubCategoryA
>Itema
>Itemb
> SubCategoryB
>Itema
>Itemb
> SubCategoryC
>Itema
>Itemb
 > SubCategory2
> SubCategoryD
> SubCategoryE
> SubCategoryF
 > SubCategory3
> SubCategoryG
> SubCategoryH
> SubCategoryI


You get the idea... I wanted to come up with a way so when this menu item OR K2_Tools module is clicked, I get a tree like structure as above in 2-3 Columns (based on SubCategory 1, 2, 3)... with no intro text etc... 

I cant get that to happen...

Any help would be appreciated...
Any help in this regard would

Please Log in or Create an account to join the conversation.

  • Ahmad Arshad
  • Ahmad Arshad's Avatar Topic Author
  • Offline
  • New Member
More
14 years 1 month ago #86702 by Ahmad Arshad
I guess what I basically want is a mixture of mod_k2_tools and mod_k2_content.... with k2 tools showing all the categories and subcategories and k2 content showing the child items...

is it really so hard? Shouldnt this be like a built in thing?

Thanks

Please Log in or Create an account to join the conversation.

  • Ahmad Arshad
  • Ahmad Arshad's Avatar Topic Author
  • Offline
  • New Member
More
14 years 1 month ago #86703 by Ahmad Arshad
can anyone help? I really need to get this working

Please Log in or Create an account to join the conversation.

  • Ahmad Arshad
  • Ahmad Arshad's Avatar Topic Author
  • Offline
  • New Member
More
14 years 1 month ago #86704 by Ahmad Arshad
never mind...

I changed mod_k2_tools so that category list will show children items under treerecurse()

Please Log in or Create an account to join the conversation.

More
14 years 5 days ago #86705 by David R.
What he meant is that he modifed the modK2ToolsHelper class in the helper.php file. The specific function he changed is treerecurse().

If you understand a bit about joomla and php, you should be able to add a helper function into that class that will run the sql needed to get the items associated with a category, and list those. I'm guessing that's what Ahmad did, and if he's not willing to share the code, writing it wouldn't be that difficult.

greg said:Hi,
I am looking for the same kind of solution.

Would you share what you changedin mod_k2_tools? Or if someone else has another solution

Thanks in advance

have a good day

greg

Please Log in or Create an account to join the conversation.

More
14 years 5 days ago #86706 by David R.
Greg,
Did you try sending a PM to Ahmad?

greg said:Hi,
First of all thanks for your quick answer.

I must say i am not really good when it comes to php, that is the main reason i use Joomla.

I do see the treerecurse function, and even if i can understand what it does i am not sure how i could modify it.

If the answer is easy for you and you can share it i would really be thankful

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum