- Posts: 2
COMMUNITY FORUM
Enable plugins on Tag view
- carlos osorio
-
Topic Author
- Offline
- New Member
Less
More
11 years 3 months ago #123522
by carlos osorio
Enable plugins on Tag view was created by carlos osorio
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..
Log in or Create an account to join the conversation.
- Yiota
-
- Visitor
11 years 3 months ago #123523
by Yiota
Replied by Yiota on topic Re: Enable plugins on Tag view
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).
Please Log in or Create an account to join the conversation.
- carlos osorio
-
Topic Author
- Offline
- New Member
Less
More
- Posts: 2
11 years 3 months ago #123524
by carlos osorio
Replied by carlos osorio on topic Re: Enable plugins on Tag view
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.
Please Log in or Create an account to join the conversation.
- Yiota
-
- Visitor
11 years 3 months ago #123525
by Yiota
Replied by Yiota on topic Re: Enable plugins on Tag view
Have you put the code inside the foreach in the tag.php file or above it?
Please Log in or Create an account to join the conversation.