Introduction
Meridix Studio has support for branding/theming through a Theme provider pipeline.
The following parts of the system can be customized to give your Meridix installation a different look and feel
- Logotypes
- Fonts
- UI colors
- Icons
- Page sections/containers
- Menus (only apperance not content)
- Report chart colors
- XLSX / XLS exported charts colors
- XLSX / XLS Call specification export
- Module names (multi language support)
- Report names (multi language support)
- Subscriber type names (multi language support)
- Link URLs (e.g. support link)
- Help section iFrame content
The login page is fully customizable where the complete page can be changed to match your companys profile.
Getting started
Overview
A theme in Meridix studio is a set of files (css, images, scripts) that is contained in a directory with a specific structure (see below). There is a default theme folder that the systems uses in no other theme is defined. If a custom theme is defined but a requiered resource is not included the system falls back on the default theme resource. This means that you can choose to only include the resources that you have changed in the theme structure.
The custom themes should be created with the defined structure (its recommended to use the default theme as a template) and compress (GZIP) the folder into a file with the name ThemeName.zip where ThemeName is the name of the Theme. There is also an option available to make the theme design phase easier (see On external server as folder structure).
Custom theme location options
There is three ways that the theme resources can be exposed to the Meridix installation.
Locally on the server
The folder (not zipped) should be defined locally in the installation root under the folder [drive]:/[webapp_path]/Themes/ThemeName
In this case no Theme base URL needs to be defined.
This option is not available on Meridix hosted installations
As a uploaded theme package (zipped archive)
The zipped theme file should be uploaded to the system on the page Administration->Settings->Theme settings inside Meridix Studio. When a theme is set and the package type is Theme package Meridix Studio loads and extracts the custom theme to an internal temporary folder and loads the resources from that location for future requests.
When uploading a new version of an existing theme the package mechanism creates a checksum based on the content of the package and compares it to any existing extracted packages with the same name, if the content has changes (i.e. the checksum) the new package replaces the existing one.
The name of the zip file should be the theme name. (Do not add the .zip extension to your theme name setting in Meridix Studio this is added automatically if the package type is set to Theme package).
On external server as folder structure (development only)
The theme folder (not zipped) should be available to the Meridix server on a public accessible URL where each individual resouce can be accessed with the url [ThemeBaseUrl]/[ThemeName]/[ThemeResourceRelativePath] ex: http://mycompany.com/Themes/CustomTheme/css/base.css where the http://mycompany.com/Themes is the Theme base URL part and CustomTheme is Theme name and css/base.css is the ThemeResourceRelativePath.
In this case each time a resource is requested (and not found in the server cache) the system loads the resource from the external resource url internally and the caches the resource for future requests.
This method is only recommended during developent of new themes because it requiers the Meridix installation to make several HTTP requests to get the theme content. But its the easiest way to design new themes since you can change the content on a server controlled by you and it will be used by the Meridix installation.
Configure Meridix Studio to use a custom theme
Only users with the role System Administrators can change theme settings
To change the current theme settings login into your Meridix installation and go to Administration->Settings->Theme settings
The following settings can be changed
Theme name
The name of the theme if not set or an empty theme is defined it will use the Default theme. (Default = "Default"). This value is case sensitive.
Theme base URL
The base URL location of the theme [folder]. This URL have to be accessible by the Meridix studio server through HTTP(s). Ex: http://mycompany.com/meridixthemes/[theme name]
Theme package type
- Theme package = The theme content is uploaded as a zipped theme package.
- Remote folder = The theme content is available as a folder/directory structure
Theme server cache duration
The number of seconds that the server caches the theme resource before going to the source (external http url). This value can be set to small (ex: 2 seconds) during the design phase to prevent stale data being sent to the client. Default value is 7200 seconds.
Theme client cache duration
The number of seconds that the clients are requested to cache the theme resource before going to the source (external http url). This value can be set to small (ex: 2 seconds) during the design phase to prevent stale data being used by the client. Default value is 7200 seconds.
Disable minification
The system minifies css and javascript files by default. This setting allows you to disable this feature.
Disable Gzip compression
The system gzip compress all resources before sending them to the clients. This setting allows you to disable this feature.
So if your custom theme is located on the publicly available URL http://mycompany.com/meridixthemes/customtheme1/ the Theme name should be custometheme1 and the Theme base URL should be http://mycompany.com/meridixthemes/
Theme resources
The theme resource handler (Theme.ashx)
All themable resources that are loaded in Meridix Studio is loaded through a resource URL that is independent of the physical location of the resource. Any predifined and custom resources are loaded based on their relative location within the package e.g. an image named logo.gif in a folder named logotypes would have the relative path logotypes/logo.gif and to access this resource through the Theme provider you would need to specify the following URL Theme.ashx?logotypes/logo.gif to access this resource.
URLs containg the Theme.ashx handler is treated specially by the system so you can always call is as a local resource from your current path, so if you are working on the page /Root/Sub/Sub/Page the Theme.ashx can be called as it were present at /Root/Sub/Sub/Page/Theme.ashx.
The theme resource handler also handles caching (both client and server side) with both an Etag header aswell as an expires header based on the settings definied in Meridix Studio. It also takes care of minification of css and javascript files so you do not need to minify them in your theme package, and all resources are Gzip compressed if the request contains the header Accept-Encoding with gzip defined (this feature can be disabled).
So if you need to include a custom image (images/custom/myimage.png) and use it from a CSS rule in e.g. base.css you can defined it as below and the theme handler will take care of the the rest.
.informationDiv { background-image: url('Theme.ashx?images/custom/myimage.png'); }
Package structure
The theme package (zip file or folder) should be structured as below:
All the folders below should be on the root level of a Theme package.
- config
- ui_colors.json
- css
- base.css
- login_page.css
- help_popup.css
- images
- favicon_default.ico
- flag_eng.png
- flag_swe.png
- icon_{description}_{size}.png (multiple)
- ....
- load_animation_{description}.gif (multiple)
- ....
- scripts
- login_page.js
- telerik
- common
- grid
- css
- Calendar.Metro.css
- ComboBox.Metro.css
- Grid.Metro.css
- Input.Metro.css
- Menu.Metro.css
- TabStrip.Metro.css
- TreeView.Metro.css
- metro
- Calendar
- sprite.gif
- ComboBox
- rcbSprite.png
- Grid
- AddRecord.gif
- Cancel.gif
- Delete.gif
- Edit.gif
- export.gif
- Filter.gif
- loading_small.gif
- MoveDown.gif
- MoveUp.gif
- PagingFirst.gif
- PagingLast.gif
- PagingNext.gif
- PagingPrev.gif
- Refresh.gif
- rgDrag.gif
- SingeMinus.gif
- SinglePlus.gif
- SortAsc.gif
- SortDesc.gif
- sprite.gif
- Update.gif
- Input
- sprite.gif
- Menu
- rmExpandArrows.png
- TabStrip
- TabStripStates.png
- TreeView
- LoadingIcon.gif
- PlusMinus.png
- TriState.png
- Calendar
- common
Theme resource descriptions
/config
ui_colors.json
This file is an JSON array that......
/css
base.css
This is the main CSS file that is included on every page.
login_page.css
This CSS file is included on the login page and can be used to customize the login user interface. Unlike the other pages in the system this page is fully customizable and all layout css is included in this file.
help_popup.css