I was having some trouble determining how to access and use a plugin in a custom component in Joomla.
I finally figured it out and the rather simple code snippet is below…
//Gives access to all plugins in the content folder JPluginHelper::importPlugin('content'); // This variable is passed by reference so we need it later $campinfo = ""; //I created my own trigger below, but "onContentPrepare" would work fine here $dispatcher->trigger('onCampPrepare', array ($id, &$campinfo)); //assign are variable to be acessed in the template $this->assignRef('campinfo', $campinfo);

0 Responses
Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.