blog.php中的Joomla 3模块覆盖
我在joomla模板中为blog.php创建了一个覆盖,我想将joomla的一些默认博客模块添加到侧栏中 我已将代码添加到我的文件中blog.php中的Joomla 3模块覆盖,php,joomla,joomla3.0,joomla-module,Php,Joomla,Joomla3.0,Joomla Module,我在joomla模板中为blog.php创建了一个覆盖,我想将joomla的一些默认博客模块添加到侧栏中 我已将代码添加到我的文件中 <div class="blogsidebar"> <div class="module"> <jdoc:include type="modules" name="blogarticles" style="custom" /> <p> </p>
<div class="blogsidebar">
<div class="module">
<jdoc:include type="modules" name="blogarticles" style="custom" />
<p> </p>
</jdoc:include></div>
<div class="module">
<jdoc:include type="modules" name="blogcategories" style="custom" />
<p> </p>
</jdoc:include></div>
</div>
但当我查看源代码时,代码更改为:
而且它并不像我想象的那样被渲染。i、 e模块不显示
我错过什么了吗
- 模块位置在templateDetails.xml中设置
- 模块存在于模块管理器中并已发布
- 模块被分配到模块位置
- 确保上面的任何内容都没有拼写错误
`
[10-Oct-2014 12:27:42 Europe/London]PHP致命错误:在第127行的templates\myteme\html\com\u content\category\blog.PHP中调用未定义的函数import()
[10-Oct-2014 13:14:04 Europe/London]PHP致命错误:第173行的\libraries\joomla\cache\controller\callback.PHP中允许的内存大小为134217728字节(尝试分配36987836字节),请尝试以下代码:
$document = &JFactory::getDocument();
$renderer = $document->loadRenderer('modules');
$options = array('style' => 'xhtml');
echo $renderer->render('blogarticles', $options, null);
谢谢,还是像上面那样抽出时间。页面在没有此代码的情况下呈现良好。
$document = &JFactory::getDocument();
$renderer = $document->loadRenderer('modules');
$options = array('style' => 'xhtml');
echo $renderer->render('blogarticles', $options, null);