如何让joomla首先检查不同文件夹的html覆盖?

时间:2013-11-02 15:44:17

标签: joomla joomla2.5

我正在制作Joomla 2.5和3.x的系统插件,它应该先在templates / template_name / html之前检查不同的html覆盖文件夹,它运行良好但我老实说不喜欢它因为它是一个hack可以是很容易被joomla更新杀死。例如,覆盖模块chrome 在我的插件中,我有:

public function onAfterInitialise() {
     JLoader::register('JModuleHelper','path to my application module helper');
}

在我的自定义helper.php中,我更改了 JModuleHelper 类方法 renderModule(),以按以下顺序检查html覆盖:

check my plugin html folder if module override file is there use it 
if no override in my plugin check template html folder 
if none of the above use joomla default. 

joomla默认是:

    check my template html folder if module override file is there use it 
   if no override in template html, use joomla default. 

是否有更简单的方法来实现这一目标?

感谢任何帮助。谢谢!