protected String getThemeNameForSite(final CMSSiteModel site) { final SiteTheme theme = site.getTheme(); if (theme != null) { final String themeCode = theme.getCode(); if (themeCode != null && !themeCode.isEmpty()) { return themeCode; } } return getDefaultThemeName(); }