Plugins in category description FCv2.0 J1.7+

More
12 years 3 months ago #21772 by ggppdk
Ok it we have fixed for category description but triggering content plugins for all subcategories may harm performance, nevertheless it is easy to include it in your template, this should work although i have not tested it:
Code:
if ($this->params->get('trigger_onprepare_content_cat')) // just check if the parmeter is active { JPluginHelper::importPlugin('content'); $dispatcher = & JDispatcher::getInstance(); foreach ($this->categories as $sub) : // Allow to trigger content plugins on category description $sub->text = $sub->description; $results = $dispatcher->trigger('onContentPrepare', array ('com_content.category', &$sub, &$this->params, 0)); $sub->description = $sub->text; } }

For j1.5
replace:
$results = ...
with:
$results =
Code:
$dispatcher->trigger('onPrepareContent', array (& $sub, & $this->params, 0));

I have opened an enhancement issue for examining to add these.

Regards


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

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

More
12 years 3 months ago #21777 by Rooney
Thanks. Does it matter where in the template I put it?

Rooney

Joomla! 3.9.24 and FC 3.3.9

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

More
12 years 3 months ago #21778 by ggppdk
No, just place before you output the descriptions of course ...


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

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

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.794 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline