- Posts: 21
COMMUNITY FORUM
k2item counter for root category
- behzad
- Topic Author
- Offline
- Junior Member
Less
More
10 years 2 months ago #130366
by behzad
k2item counter for root category was created by behzad
Hi,
I'm using K2Tools module as Categories List (Menu) and it displays the number of items of each category in front of it, but I need to display number of items of all subcategories in front of root category, is it possible?
apartment(0)
for sale(1)
for rent (5)
others (3)
these are should be display as :
apartment(9)
for sale(1)
for rent (5)
others (3)
:(
I'm using K2Tools module as Categories List (Menu) and it displays the number of items of each category in front of it, but I need to display number of items of all subcategories in front of root category, is it possible?
apartment(0)
for sale(1)
for rent (5)
others (3)
these are should be display as :
apartment(9)
for sale(1)
for rent (5)
others (3)
:(
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
- Offline
- Platinum Member
Less
More
- Posts: 15920
10 years 2 months ago #130367
by Krikor Boghossian
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Replied by Krikor Boghossian on topic Re: k2item counter for root category
I am sorry but this module only counts the items belonging directly to that category,
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- behzad
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 21
10 years 2 months ago #130368
by behzad
Replied by behzad on topic Re: k2item counter for root category
do you know any module that can do this for me (in front-end) ?
Please Log in or Create an account to join the conversation.
- Lefteris
- Offline
- Moderator
Less
More
- Posts: 8743
10 years 2 months ago #130369
by Lefteris
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Replied by Lefteris on topic Re: k2item counter for root category
@behzad
If you are familiar with K2 templates and PHP you can use some maths to make this. However this will only count the root categories and it's direct children items. It will not be applied to the children categories of the children etc.
If you are familiar with K2 templates and PHP you can use some maths to make this. However this will only count the root categories and it's direct children items. It will not be applied to the children categories of the children etc.
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- behzad
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 21
10 years 2 months ago #130370
by behzad
Replied by behzad on topic Re: k2item counter for root category
hi,
thanks for your answer
could you wirte the code that you said?
thanks for your answer
could you wirte the code that you said?
Please Log in or Create an account to join the conversation.