Custom Images / Theming with the Overrides Directory
-
Greetings all, I'm setting up a Mango Automation application and would like some instructions on using the overrides folder. Here is an example:
I want to put a custom header logo that would apply to the site pages. I note that the upper left logo of "Mango Automation" is named logo.png and is located under /web/images. I took my company logo and put it into the /exceptions folder, renaming my file to logo.png (it was already a png file format) and restarted M2M2. I used shift + F5 to refresh and the old Mango Automation logo is still there.
Next I tried creating a duplicate folder hierarchy under the overrides folder, /overrides/web/images and put the custom logo.png in there. I stopped and started M2M2 again, refreshed, and the Mango Automation logo is still there.
Am I missing a step or not using the overrides folder correctly? Note that the product is not yet licensed (but it will be), so if a license is required to utilize the overrides feature let me know.
Thank you for any direction,
Jordan
-
Hi Jordan,
The overrides folder is only for i18n files, env.properties, and the log4J configuration. If you want to override the logo, you need to create a style module. See https://github.com/infiniteautomation/ma-modules-public/tree/master/SST Theme for an example.
-
Thanks for the explanation. For preparedness for an upgrade when that eventually happens, I think the only thing I can do is make a log of everything I change outside of /overrides and then redo those changes post-upgrade. Does that sound accurate? Thanks,
Jordan
-
Well, it's a short term solution with a potentially painful future. You should really be creating modules for everything outside of overrides. If the core doesn't have the hooks you need then we'll add them.