Theme and property precedence

The theme and properties that should be used are resolved by the Get User Theme service. This can be passed a user and/or a server domain name.

The theme returned is the first of:

  • Theme defined on the user node, if the user is passed.
  • Theme defined on the account node, if the user is passed.
  • Theme defined for the domain, if the server name is passed.
  • Default theme with default brand.

In each case, the theme node is read from the Theme (system.THEME) member of the node.

The resources are all read from the theme. Resources are not, for example, combined beetween a domain-defined theme and an account-defined theme if both themes are specified.

The properties returned is a merge of:

  • Properties of the user, if the user is passed. These are read from the user node.
  • Properties of the account, if the user is passed. These are read from the node targetted by the Account properties (system.ACCOUNT_PROPERTIES) member of the account node.
  • Properties of the domain, if the server name is passed. These are read from the domain node.
  • Properties of the theme.

Properties of the user override those of the account, which override those of the domain, which override those of the theme.

Unlike the resources, where all the resources are read from the same theme and are not merged, the list of properties from different sources are merged. For example, Metrici may provide a built-in theme called "Springtime", which would inherit the default Metrici branding. A user's account may have been configured to present a different brand. If the user selects the "Springtime" theme, they would expect the appearance of the screens to change, but not the company name.

The user and account may contain other properties which are not used by the theme processing, including: