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.
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 {
@Override
public void init(Map<String, Object> params) {
super.init(params);
URI location = Page.getCurrent().getLocation();
if (location.getHost().contains("host")) {
// add styles to the web page root
AppUI.getCurrent().addStyleName("customer-branding-host");
}
}
}
Then add your CSS customization to the extended theme: