简体   繁体   中英

Joomla 3.1 Override Libraries

I have a Joomla 3 website and want to override

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

I put my html.php file in templates/MY_TEMPLATE/html/html.php

this does not help, neither helps if I put in my template index.php file the following:

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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