Branding for sub-domains


I was wondering if anyone can tell me it it is possible to have the branding items you see in the Project Properties in Studio change depending on the subdomain. I’m hoping there is some early way in to CUBA to change these.

For example.
Shows Client1’s Branding
ShowsClient2’s branding

Thanks for any help.


You can get current URL address from web browser and assign top-level CSS class for the entire web page something like (Create extended main window using CUBA Studio screen template):

public class ExtAppMainWindow extends AppMainWindow {
    public void init(Map<String, Object> params) {

        URI location = Page.getCurrent().getLocation();
        if (location.getHost().contains("host")) {
            // add styles to the web page root

Then add your CSS customization to the extended theme:

  .customer-branding-host .c-inverse-header.c-app-menubar {
    background: red;
1 Like

Hi @artamonov

Thanks for that information. I got what i needed working from that.