Skip to Content

XSA: Apply a Custom Theme to Launchpad Site

Hello experts,

I'm landing into XSA and trying to apply a custom theme for a launchpad site module in XSA. The theme was created with the SAP UI Theme designer tool, exported in a zip file and then uploaded under my project folder for a Fiori Launchpad Site module.

The structure would be as follows, where "themes" subfolder contains the new theme "custom_belize_logo" :

Then, following SAP HANA Developer Guide for XSA's instructions for this topic https://help.sap.com/viewer/4505d0bdaf4948449b7f7379d24d0f0d/2.0.04/en-US/87658e2ad2334809a38535e0556d2a9c.html I completed site-content.json with the new theme name:

		"payload": {			
                           "sap.cloud.portal": {
				"_version": "1.2.0",
				"config": {
					"theme.id": "sap_belize_custom",
					"theme.active": "[\"sap_hcb\",\"sap_belize_plus\",\"sap_belize\", \"sap_belize_custom\"]"
				}
			}
********************************************************************
	"siteThemes": {
		"sap_belize_custom": {
			"description": "SAP Belize Custom",
			"name": "custom_belize_logo",
			"path": "custom_belize_logo"
		}

Then within "routes" in xs-app.json:

{
		"source": "/themes/(.*)",
		"target": "$1",
		"localDir": "themes"
	}

However, when deploying to XSA I got the following error stating that themes is not a directory:

So I must be missing something obviously. I would appreciate a lot if you could point me out where I'm failing.

Thanks a lot for your time and assistance.

Regards,

Daniel

Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • Best Answer
    Posted on May 20, 2020 at 09:49 AM

    Hi Daniel,

    It looks to me that you have the theme's folder in the wrong location. Try moving it to the following structure:

    /launchpaddemo/launchpaddemo/resources/themes

    Thanks,

    Brad.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jul 12, 2020 at 08:08 AM

    Hi Daniel,

    I would like to add a bit to the explanation of Brad. First, as the help states, the theme can be saved in e.g. a folder named themes under the fiori launchpad site folder. No need to create a resources folder.

    The xs-app.json must look differently than what the help describes though. The name of the theme must be in the source of the route. Below worked for me:

    {
    	"routes": [{
    		"source": "^/<your technical theme name>/(.*)",
    		"target": "$1",
    		"localDir": "themes"
    	}]
    }
    

    as for the technical name use the one you refer to in site-content.json in "siteThemes"

    Gunter

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jul 27, 2020 at 10:23 PM

    Glad it helped Daniel, you can upvote both posts if you like by clicking on arrow beside the post. FLP site on HANA XSA is a bit of trial and error at times, as it requires deployment to test I haven't figured out a way to debug when searching an error. If someone knows, I would be interested.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.