Template Overide to Run Content Plugins on Category Descriptions


/ Published in: PHP
Save to your folder(s)

File: /template/[mytemplate]/html/com_content/category/blog.php page...


Copy this code and paste it in your HTML
  1. // Hack to run content modules on cat description
  2. $article =& new JObject();
  3. $article->text = $this->category->description;
  4. $dispatcher =& JDispatcher::getInstance();
  5.  
  6. JPluginHelper::importPlugin( 'content' );
  7. $results = $dispatcher->trigger('onPrepareContent', array (& $article, array(), 0));
  8.  
  9. $this->category->description= $article->text;

URL: http://forum.joomla.org/viewtopic.php?f=469&t=250173

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.