Skip to content
Rich Rowley edited this page Jun 17, 2016 · 3 revisions

We want to make customizing SimpleInvoices a breeze, while allowing your customizations to survive future updates. There are two ways to do that:

Hooks

For basic needs like adding a Header/Footer, some CSS and menus.

By editing the custom/hooks.tlp template file, you can plug some HTML code bits at strategic places like :

- HEAD section (ie to add custom CSS or JS headers) - Start and End of BODY (ie to add a Custom Header and Footer with logo) - In the Top and Tabs menu (ie to add some custom navigation)

This is totally Update proof!

Module Overriding

To customize any template or module.

  • Creating a template in: /custom/default_template/
  • or creating a module in: /custom/modules/
will automatically override the factory version (originally in /templates/default/ and /modules/)

This is easily update-able by a simple diff between the overridden and the overriding version of the existing custom files; It may be even simpler if the overriding files do "require()" their overridden files.


To better understand how this works, please replace the custom/ folder by the extras/custom_example/ folder, and examine the code. Both Hooks and override methods are used there.

Clone this wiki locally