Skip to Content
0

Help for Adding a Title to Launchpad Home Page

Jun 12, 2017 at 04:21 PM

93

avatar image
Former Member

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

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
avatar image
Former Member Jun 13, 2017 at 09:00 AM
0

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

Show 2 Share
10 |10000 characters needed characters left characters exceeded

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

0
Former Member

Sorry Krishna, my mistake. Following is the difference:

Working Code:

var oRenderer = sap.ushell.Container.getRenderer("fiori2");
0
Krishna Kishor Kammaje
Jun 13, 2017 at 03:54 AM
0

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”); 
Show 2 Share
10 |10000 characters needed characters left characters exceeded
Former Member

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.

0

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

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

0