I have tried to follow every single guide and tutorial on setting a custom theme online without any luck.
I have a simple UI5 app set up in SAP Cloud Platform and a custom theme also set up in SAP Cloud Platform in the theme designer service. The app has been linked with a '/doorway/' link (not the actual deployed SCP link) and I can see a preview in the theme designer which looks correct.
My problem is linking the theme to my app. The theme is published and running, but using a URL or bootstrap script linkage in the UI5 app does not get the theme into my app.
This is the bootstrap script in the index.html file:
<script id="sap-ui-bootstrap"
src="https://sapui5.hana.ondemand.com/1.48.9/resources/sap-ui-cachebuster/sap-ui-core.js"
data-sap-ui-appCacheBuster="./"
data-sap-ui-libs="sap.m"
data-sap-ui-theme="customethemename"
data-sap-ui-theme-roots='{"customethemename" : "https://customethemename-accountid.dispatcher.hana.ondemand.com/UI5/"}'
data-sap-ui-compatVersion="edge"
data-sap-ui-resourceroots='{"my.app.name": ""}'>
</script>
This is the neo-app.json file:
{ "path": " /themedesigner",
"target": {
"type": "application",
"name": "themedesigner"
},
"description": "Route for theme designer"
}
Normally SAP UI5 application has default themes blue_crystal and gold_reflection themes. But If want to apply different theme, you can create one theming file and directly can apply the same to App.
The steps to apply custom theme follows:
Change the theme name from sap_bluecrystal to CustomTheme in index.html;
Add route to you neo-app.json if you haven't done it already.
Hope that helps!