Chapter: Overloading module files
|« Using themes||^ Advanced development||Developping plugins »|
A Jelix application can make use of third-party module. But certainly, you will need to customize it more or less. Still, it would be a pain to modify its code directly. Jelix offers a way to overload the module files. As a result, any update of the module will be transparent and won't revert your modifications.
Module files you can overload :
As for templates, see theme system description. If you haven't configure your themes, then the default one is active. You only need to put your modified files in var/themes/default.
Other files needs to be located under var/overloads/<module_name_to_overload>/. Say you want to overload example module.
- daos will be located under var/overloads/example/daos/
- forms will be located under var/overloads/example/forms/
- locales will be located under var/overloads/example/locales/
Filenames must be equivalent to their original copy. And in the case of dao, you shoud respect its original api, ie, keep all methods defined in the original.
Any overloaded files respecting those criterias will automatically be loaded by Jelix and used instead of its original copy.