简体   繁体   English

Joomla 3.1覆盖库

[英]Joomla 3.1 Override Libraries

I have a Joomla 3 website and want to override 我有一个Joomla 3网站,想要覆盖

libraries/cms/html/html.php . libraries/cms/html/html.php

Is it possible? 可能吗?

I tried to use same technique described here How to override Joomla System Messages - message.php template 我尝试使用此处描述的相同技术如何覆盖Joomla系统消息 - message.php模板

I put my html.php file in templates/MY_TEMPLATE/html/html.php 我把我的html.php文件放在templates/MY_TEMPLATE/html/html.php

this does not help, neither helps if I put in my template index.php file the following: 这没有帮助,如果我在我的模板index.php文件中放入以下内容,则无济于事:

require_once JPATH_ROOT .'/templates/'. $this->template .'/html/html.php';

You can't override it using template overrides. 您无法使用模板覆盖覆盖它。 It's an issue we have in Joomla which isn't solved yet. 这是我们在Joomla中遇到的一个尚未解决的问题。

The only way to override library files is if you provide a system plugin which will register an additional library path to the autoloader. 覆盖库文件的唯一方法是,如果您提供系统插件,该插件将注册到自动装带器的附加库路径。 Then it should be possible to override such classes. 然后应该可以覆盖这些类。 See http://developer.joomla.org/manual/ch01s04.html for information about the autoloader and how to register own libraries. 有关自动装带器以及如何注册自己的库的信息,请参见http://developer.joomla.org/manual/ch01s04.html

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

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