Good Day,
i like to know if is possible enable plugins on tag view, i found the code in \components\com_k2\views\itemlist\view.html.php where it is assumed that the code should appear,
i try add the code from other views, and not work..
i like to know if is possible enable plugins on tag view, i found the code in \components\com_k2\views\itemlist\view.html.php where it is assumed that the code should appear,
i try add the code from other views, and not work..
Y
12 years 9 months ago #123523
Try to put the code
you have already provided in the tag.php file of your overrides (getk2.org/documentation/tutorials/174-templating-with-k2-and-the-concepts-of-sub-templates).
$dispatcher = JDispatcher::getInstance();
JPluginHelper::importPlugin('k2');
$results = $dispatcher->trigger('K2AfterDisplayContent', array(&$item, &$params, $limitstart));
$this->event->K2AfterDisplayContent = trim(implode("\n", $results));you have already provided in the tag.php file of your overrides (getk2.org/documentation/tutorials/174-templating-with-k2-and-the-concepts-of-sub-templates).
Topic Author
12 years 9 months ago #123524
Good Day, and thanks Yiota Ziaggou,
I've already add the code you provided me, however doing a debug I've noticed that it is not loaded and is undefined variable $item in the section corresponding to the tag in the view \components\com_k2\views\itemlist\view.html.php
thanks again.
I've already add the code you provided me, however doing a debug I've noticed that it is not loaded and is undefined variable $item in the section corresponding to the tag in the view \components\com_k2\views\itemlist\view.html.php
thanks again.
Y
12 years 9 months ago #123525
Have you put the code inside the foreach in the tag.php file or above it?
