Keyword

Category info block at the end of a k2 item

  • demonas
  • demonas's Avatar Topic Author
  • Offline
  • New Member
More
13 years 2 months ago #98638 by demonas
I want a very simple thing. I just want to show all the information ( picture,description, any plugins for category like googlemap) of the category that holds and item. I don't wan't only the line that says "published in category: Category name with link" at the bottom of the k2 item.

 

I need all the info of this category. Its very hard for someone that its not a php and or joomla expert to understand K2 without any kind of documentation. Its really pitty.

 

I am trying to understand the category.php in template but I just can't understand how to grab the category id from the k2 item and how to show all this information.

 

 

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

  • demonas
  • demonas's Avatar Topic Author
  • Offline
  • New Member
More
13 years 2 months ago #98639 by demonas
Replied by demonas on topic Category info block at the end of a k2 item
Anybody?

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

  • demonas
  • demonas's Avatar Topic Author
  • Offline
  • New Member
More
13 years 2 months ago #98640 by demonas
Replied by demonas on topic Category info block at the end of a k2 item
I found it myself.

 

STEPS that worked for me ( in the place of "k2gmap" you can put your plugin)

1) $pluginParams = new K2Parameter($this->item->category->plugins,'','k2gmap');2) To know the syntax of the fields I Used >>print_r($pluginParams);  3) Finally to get the value I used =>        echo $pluginParams->_registry->k2gmaplatitude;

 

So the complete code is this:

 

$pluginParams = new K2Parameter($this->item->category->plugins,'','k2gmap');//print_r($pluginParams);  echo $pluginParams->_registry->k2gmaplatitude;

 

Hope that helps. It took me hours of searching and testing things. In this way you can get any value from any plugin and show it inside item.php

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


Powered by Kunena Forum