【发布时间】:2014-08-02 13:47:23
【问题描述】:
我曾使用 joomla 1.5 中的代码在 com_content >> 文章中加载 mod_related_items:
<?php
jimport('joomla.application.module.helper');
$module = &JModuleHelper::getModule('module_type(example:"mod_related_items")','Position-name');
echo JModuleHelper::renderModule($module);
?>
<?php echo $this->item->event->afterDisplayContent; ?>
我曾使用此文件末尾的代码:components/com_content/views/article/tmpl/default.php
现在我想在 joomla 2.5 中使用此代码。
当我在 jooma 2.5 中使用它时,我遇到了这些错误:
注意:试图获取非对象的属性 C:\wamp\www\kknews.ir\libraries\joomla\application\module\helper.php 在第 152 行
注意:试图获取非对象的属性 C:\wamp\www\kknews.ir\libraries\joomla\application\module\helper.php 在第 156 行
注意:试图获取非对象的属性 C:\wamp\www\kknews.ir\libraries\joomla\application\module\helper.php 在第 159 行
注意:未定义的属性:stdClass::$content in C:\wamp\www\kknews.ir\templates\system\html\modules.php 第 16 行
请帮帮我。
【问题讨论】:
标签: joomla module components