cancel
Showing results for 
Search instead for 
Did you mean: 

Help for Adding a Title to Launchpad Home Page

Former Member
0 Kudos

I am trying to add custom title on Fiori Launchpad Homepage. I have tried creating a UI plugin. I am not 100% that's correct approach or not. But it didnt work anyway.

I see SAP help provides information at following link. But it's very hard to figure out where to add this piece of code?

Really appreciate if someone can point me in right direction?

https://help.sap.com/saphelp_nw75/helpdata/en/d5/8602924af34fc3816d44ddb6a9e911/frameset.htm

Regards,

Arpit

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello Krishna,

Please don't worry about it. I got it fixed. However I find it a bit strange. The following code worked instead of SAP's help code.

Code which worked:

var oRenderer = jQuery.sap.getObject("sap.ushell.renderers.fiori2.Renderer");

oRenderer.setHeaderTitle("Some Title");

Code which didn't work:

var oRenderer = jQuery.sap.getObject("sap.ushell.renderers.fiori2.Renderer");
oRenderer.setHeaderTitle(“SomeTitle”);

Thanks,

Kind Regards,

Arpit

kammaje_cis
Active Contributor
0 Kudos

Do not see any difference other than the double quotes. Am I missing anything?

Former Member
0 Kudos

Sorry Krishna, my mistake. Following is the difference:

Working Code:

var oRenderer = sap.ushell.Container.getRenderer("fiori2");
Vlad
Advisor
Advisor
0 Kudos

Don't copy-paste the code from above and below. There is a syntax error in the second line (look at double quotes).

Answers (1)

Answers (1)

kammaje_cis
Active Contributor
0 Kudos

Ensure that your UI Plugin is actually loading. (Using Developer Tools). If not, issue might be with assigning the user plugin to the users.

Hope you have used below code in the UI Plugin for setting the custom title.

var oRenderer = jQuery.sap.getObject("sap.ushell.renderers.fiori2.Renderer");
oRenderer.setHeaderTitle(“Some Title”); 
Former Member
0 Kudos

Thanks for your feedback Krishna.

I am quite sure that UIPlugin is loading and also I have created a Shell-Plugin mapping and have assigned it to the user through catalogue. I hope that is the correct approach?

I have used the same code as you have provided. Also I am sure you are aware but this sample code the “ before and after Some Title are incorrect :). They need to be ".

Anyways, please find below screen-shot from console. Although its showing error because UIPlugin doesn't have Component-preload.js but has Component.js

This is working for other UIPlugin which is UIpluginUserProfile and UIPluginSampleAddHeaderItems.

Please find below screen-shot from console showing errors.

kammaje_cis
Active Contributor
0 Kudos

Somehow your rendered doe snot seem to have the API setHeaderTitle.

Can you show your code.. ? also what is your UI5 version?