Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在一个 Joomla 站点工作,我想在组件视图中包含一个模块,任何人都可以帮助我。我正在使用此代码显示未经授权的访问消息。
<div class="used_image"> <?php include($mosConfig_absolute_path."/modules/mod_MODULENAME/mod_MODULENAME.php"); ?> </div>
试试这个
jimport('joomla.application.module.helper'); // this is where you want to load your module position $modules = JModuleHelper::getModules('header'); foreach($modules as $module) { echo JModuleHelper::renderModule($module); }