Keyword

K2 Tools and Categories

  • Matthew Dell
  • Matthew Dell's Avatar Topic Author
  • Offline
  • New Member
More
12 years 3 months ago #66984 by Matthew Dell
K2 Tools and Categories was created by Matthew Dell
I am using K2 tools with the category option. I have been trying to find a way to display the description or the image associated with the category. Has anyone done this or has an idea of where to find the code to get this done?

The categories and subcategories are displaying correctly in the module, I just need the category description or image!

Thanks
matt

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

  • Matthew Dell
  • Matthew Dell's Avatar Topic Author
  • Offline
  • New Member
More
12 years 3 months ago #66985 by Matthew Dell
Replied by Matthew Dell on topic Re: K2 Tools and Categories [RESOLVED]
I hope this will help someone! I added the following lines to helper.php under mod_k2_tools starting after line 402:


$query ="SELECT * FROM #__k2_categories WHERE id={$root_id}";
$db->setQuery($query);
$row = $db->loadObject();
echo $row->description;

This will display the parent category description using the K2 Tools module with the Categories List Menu option. It would be great to have this as an option in the admin area for this tool!

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


Powered by Kunena Forum