Force Mendix app to use my custom theme

1
I've got a custom theme representing our corporate look and feel. I want the application to use this theme and only this theme. I've set the theme in the project settings, cleared the cache and refreshed, but no matter what I do it always uses the default theme that comes with Mendix out of the box. I can select my corporate theme in its selector, but I just want the application to start directly in the corporate theme and delete all the others (default, dutch, and so on). It copies the other themes into deployment from somewhere, but I can't see where. How do I do this in 3.3.2 please?
asked
2 answers
1

To make your theme the default, make sure that it contains a file called index.html as well as index-mytheme.html.

To remove the default themes that come with the Modeler, take a look at the file deployment.mxz in the Modeler install directory (like C:\Program Files (x86)\Mendix\4.0.1\modeler\deployment.mxz). Change the file extension to .zip and open the archive. You will see all the elements of the default themes in the web directory.

Remove or replace whatever parts of these you want with your own theme, re-zip and then change the extension name back to deployment.mxz. Then replace this file in the modeler installation directory. I suggest you take a copy of the original mxz file beforehand in case you make any mistakes of remove the wrong files, or wish to revert for another project.

Using this technique you do not also need to specify your zipped theme in the modeler as the files you want will already be there from deployment.mxz

Edit: PS. Also remove the theme selector div from your theme as you will not need this and it will no longer work.

PPS. If your corporate theme uses any parts of the standard themes, such as images, make sure you do not remove these. The simplest way to remove the out-of-the-box themes is just to remove their index-xxx.html pages so they cannot be accessed, but leave the other ui components that you may be using in your theme.

PPPS. This method is probably not recommended by Mendix

answered
0

If you remove the theme switcher only your style should be shown. Take a look at the wiki for the how to: advanced theme course The result should be the same as David suggested. And it is probably the preferred way ;)

answered