Cold_Class
Cold_Class

Reputation: 3494

How to apply custom theme from Theme Builder to standalone SAPUI5 app in index.html?

I made a custom SAPUI5 theme through transaction /UI5/THEME_DESIGNER in S/4HANA on premise and successfully applied it to my Fiori launchpad.

Can I somehow reuse it in my standalone SAPUI5 app without adding it to the url?

What I tried so far:
In my index.html

<script id="sap-ui-bootstrap" 
    data-sap-ui-theme="<custom_theme>"
...

This successfully causes some CSS downloads in the network tab, like from

Only when I add

to the url it suddenly works. This proofs to me that I just don't understand how to add the theme in my index.html - I tried many different approaches, like adding data-sap-ui-theme-roots but can't figure out what the correct syntax/path is...

Upvotes: 0

Views: 133

Answers (0)

Related Questions