cancel
Showing results for 
Search instead for 
Did you mean: 

using custom theme in project

Former Member
0 Kudos

Hi,

  I am trying to work with custom themes. I have a custom theme that I have built using theme designer and I am trying to use it in my project but without saving it on a server, ie: extract the files and load them manually into my project. I have exported it and I have the contents of the zip file. I am trying to find where in the project(on Eclipse) it should be imported. Any help on this?

Thanks.

Tags edited by: Michael Appleby

Accepted Solutions (0)

Answers (2)

Answers (2)

Lorenz
Discoverer
0 Kudos

Hello Adarsh,

create a new folder in Eclipse under the WebContent folder named resources.

Now go into the zip File and extract the Folder sap, which can be found in the UI5 Folder.
After this, just upload the sap folder into the resources folder in Eclipse with drag & drop.

After this you need the path there the Theme is located.

For example the URL to the Application is <IP>:<PORT>/sap/bc/ui5_ui5/sap/ui5_shell/index.html.

The path of the Theme would be: /sap/bc/ui5_ui5/sap/ui5_shell/resources/ 

Now edit your HTML like this:

<script src="resources/sap-ui-core.js"
id="sap-ui-bootstrap"
data-sap-ui-libs="sap.ui.ux3, sap.ui.commons, sap.ui.table, sap.m, sap.me"
data-sap-ui-theme-roots='{"my_Theme" : "/sap/bc/ui5_ui5/sap/ui5_shell/resources/"}'
data-sap-ui-theme="my_Theme">
</script>

Regards,

Lorenz

agentry_src
Active Contributor
0 Kudos

Hi Adarsh,

Not sure how your would use itin Eclipse, but would suggest that you have a look at some of the theme designer blogs and docs in the "What is SAP Fiori UX?" landing page (use the Theme Designer tab).  For just basic testing, you can add the custom theme url extension which can be found in the /n/ui5/theme_tool t-code.  Find your custom theme click on Info to open a page with two lines on it.  Ctrl-Y to copy the entire first line then paste it onto the end of your app url (or Launchpad if Fiori based) making sure to adjust for syntax.  That should override the base theme with your custom theme.

Regards, Mike

SAP Customer Experience Group - CEG