从类别博客视图(joomla)调用插件onContentPrepare

从类别博客视图(joomla)调用插件onContentPrepare,joomla,field,categories,Joomla,Field,Categories,我在文章中找到了关于如何实现自定义字段的页面: http://docs.joomla.org/Adding_custom_fields_to_the_article_component 它工作得很好,但只在文章视图中 我还应该做些什么,让它显示每篇文章中的自定义字段 在类别博客视图中 我试着加上: $dispatcher = JDispatcher::getInstance(); JPluginHelper::importPlugin('content', 'plg_content_ratin

我在文章中找到了关于如何实现自定义字段的页面:

http://docs.joomla.org/Adding_custom_fields_to_the_article_component
它工作得很好,但只在文章视图中

我还应该做些什么,让它显示每篇文章中的自定义字段 在类别博客视图中

我试着加上:

$dispatcher = JDispatcher::getInstance();
JPluginHelper::importPlugin('content', 'plg_content_rating');
$results = $dispatcher->trigger('onContentPrepare',
    array('com_content.category', & $this->item, & $this->item->params, 0));
到我的分类博客覆盖文件,但这不起作用

同样在components/com_content/views/category/view.html.php文件中, 有一行是这样的:

$results = $dispatcher->trigger('onContentPrepare',
    array ('com_content.category', &$item, &$this->params, 0));
这不应该已经触发所有注册的内容插件吗

文章的view.html.php文件中的类似行也适用于此
目的。

请尝试在专用网站上提问:@Lodder我不知道它存在。