Keyword

Plugin fired in module - problem.

  • Code Snipper
  • Code Snipper's Avatar Topic Author
  • Offline
  • New Member
More
11 years 10 months ago #107169 by Code Snipper
Plugin fired in module - problem. was created by Code Snipper
I have written simple Disqus for K2 plugin. Plugin inserts some javascript code in document's head. When it is fired from module, javascript is inserted for every item (onK2BeforeDisplay). Is there any other method to insert this code only once for whole module?

I have tried create new trigger onK2BeforeModule - i have edited files:

mod_k2content/templates/default/default.php
com_k2/item/item.php
mod_k2_content/helper.php

I have duplicated entry K2BeforeDisplay and changed into K2BeforeModule but it does not work.

Anyone can help?

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

More
11 years 10 months ago #107170 by Lefteris
Replied by Lefteris on topic Re: Plugin fired in module - problem.
Hi. Add a variable to your plugin class to control the piece of code that adds the javascript.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

  • Code Snipper
  • Code Snipper's Avatar Topic Author
  • Offline
  • New Member
More
11 years 10 months ago - 11 years 10 months ago #107171 by Code Snipper
Replied by Code Snipper on topic Re: Plugin fired in module - problem.
Seems to be too complicated for me :(

OK another try: how to get $this->item->id from plugin triggered onBeforeRender?

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


Powered by Kunena Forum