Hello
I have a plugin question, i need to insert the following piece of code in a k2 template. The plugin works but the farm parameter not filled. It should ge its value from the $farm variable but i can't fix it . I ve tested the value of $farm before and after the plugin code, it has the good value.
So question is, what am i doing wrong ? Tks for your help !
I have a plugin question, i need to insert the following piece of code in a k2 template. The plugin works but the farm parameter not filled. It should ge its value from the $farm variable but i can't fix it . I ve tested the value of $farm before and after the plugin code, it has the good value.
So question is, what am i doing wrong ? Tks for your help !
14 years 2 months ago #102741
Hi. In order to get the parameters of any Joomla! plugin you can use the following code:
Note that this example takes the parameters of the Load Module content plugin. You should specify the name of the plugin you wish.
$plugin = JPluginHelper::getPlugin('content', 'loadmodule');
$params = new JRegistry($plugin->params);
Note that this example takes the parameters of the Load Module content plugin. You should specify the name of the plugin you wish.
Topic Author
14 years 2 months ago #102742
Hello Lefteris
I am not too sure about your answer. Maybe i ve misguided you. I don't want to extact a variable from a plugin, i want to inject it in the plugin. Does that make sense ?
I want the plugin to use a k2 extra field as one of its variable
O
I am not too sure about your answer. Maybe i ve misguided you. I don't want to extact a variable from a plugin, i want to inject it in the plugin. Does that make sense ?
I want the plugin to use a k2 extra field as one of its variable
O
14 years 2 months ago #102743
Hi. What kind of plugin are you developing? If it's a K2 or content plugin the whole item is available in your function including the item extra fields.