Keyword

Write query to retrieve count of items published to subcagegories

  • George Nasis
  • George Nasis's Avatar Topic Author
  • Offline
  • Elite Member
More
2 weeks 3 days ago #173731 by George Nasis
George Nasis created the topic: Write query to retrieve count of items published to subcagegories
Hallo,

I am trying to retrieve the total count of items published in categories B C D E F, ...., Z all children of A categories.

Can I write something to retrieve directly from A instead to include all the children categories?

Thank you

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

  • Fotis
  • Fotis's Avatar
  • Away
  • Administrator
  • JoomlaWorks Support Team
More
2 weeks 2 days ago #173734 by Fotis
Fotis replied the topic: Write query to retrieve count of items published to subcagegories
A good starting point is the helper.php file of the K2 Content module: github.com/getk2/k2/blob/master/modules/mod_k2_content/helper.php#L94

The code starting from github.com/getk2/k2/blob/master/modules/mod_k2_content/helper.php#L135 clearly shows how to grab the items from children categories.

If you use & love K2, please take a moment to add your review and rate it
at the Joomla Extensions Directory: extensions.joomla.org/extension/k2/


IMPORTANT: Please search the forum before posting a question!

JoomlaWorks Support Team Member

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

  • George Nasis
  • George Nasis's Avatar Topic Author
  • Offline
  • Elite Member
More
2 weeks 2 days ago #173737 by George Nasis
George Nasis replied the topic: Write query to retrieve count of items published to subcagegories
You are right Fotis thank you very much!

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

  • Fotis
  • Fotis's Avatar
  • Away
  • Administrator
  • JoomlaWorks Support Team
More
2 weeks 2 days ago #173740 by Fotis
Fotis replied the topic: Write query to retrieve count of items published to subcagegories
You're welcome.

If you use & love K2, please take a moment to add your review and rate it
at the Joomla Extensions Directory: extensions.joomla.org/extension/k2/


IMPORTANT: Please search the forum before posting a question!

JoomlaWorks Support Team Member

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


Powered by Kunena Forum