php 如何在组件区域中显示模块

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了php 如何在组件区域中显示模块相关的知识,希望对你有一定的参考价值。

// To include a modul position in your component view and to load modules there, you just have to add

echo JHtml::_('content.prepare', '{loadposition yourmodulposition}');

// to the view

/* The second string with the load position short tag can be replaced with a var which contains more html if you need that. You don't have to write that line for every new modul position*/

$outputModules = '<strong>Some Html</strong>'
                 '{loadposition yourmodulposition1}'
                 .'{loadposition yourmodulposition2}';


echo JHtml::_('content.prepare', $outputModules);

以上是关于php 如何在组件区域中显示模块的主要内容,如果未能解决你的问题,请参考以下文章