简体   繁体   English

调用Joomla模块到php文件

[英]Calling a Joomla Module to php file

How to call a joomla module by id to a php file. 如何通过ID调用joomla模块到php文件。 This Php file is inside a directory in root folder like test/test.php 此Php文件位于根文件夹(如test / test.php)中的目录中

$modules =&  JModuleHelper::getModules('155');

foreach ($modules as $module){
    echo JModuleHelper::renderModule($module);
}

Hm i think there are 2(3) modes/method. 嗯,我认为有2(3)种模式/方法。

  1. In your PHP you have to integrate all joomla parts (framework) and than call your PHP 在您的PHP中,您必须集成所有joomla零件(框架),然后调用您的PHP

  2. I more propher way is to use extensions ( click - list of them ) which will give a place to code your staff in addition to Joomla! 我更建议的方法是使用扩展名( 单击-其中的列表 ),这将为Joomla之外的人员提供编码的地方!

  3. The best will be to a develop a module/plugin/component. 最好的办法是开发一个模块/插件/组件。 But that could take some time. 但这可能需要一些时间。

So the best solution for you is a think a 2. one becouse you will end up with a custom PHP file but in a addition will be Joomla framework features. 因此,对您来说最好的解决方案是2.一个人,因为您最终将获得一个自定义PHP文件,但另外还有Joomla框架功能。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM