on 08-25-2015 4:34 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sandip,
I found the API, it is quite simple I think using it is not a bad idea.
var oRendererExtensions = jQuery.sap.getObject("sap.ushell.renderers.fiori2.RendererExtensions");
oRendererExtensions.setHeaderTitle("test");
You can easily create even your own javascript code to manage this header title easily and just create an iView that will include the javascript code.
Put the iView as the last part of the framework page, make sure it has no tray and it will work great.
When using the CSS option you should only do it if your title will not change at all, if you want to change it you will need JS code anyways so it is better to use the API.
BR,
Saar
Hi Saar
finally got a chance to test it, it didnt work. I added the script as KM document iview and added it to the framework page, but nothing.
here is the content of the document
<script type="text/javascript">
var oRendererExtensions = jQuery.sap.getObject("sap.ushell.renderers.fiori2.RendererExtensions");
oRendererExtensions.setHeaderTitle("Limited Edition Portal");
</script>
Are you getting the results when adding the script as document iview?
Thanks
Sandip
Hi Sandip,
KM is running inside of an iFrame, I think this might be the issue here.
first you must relax the domain and then try to get the EPCM top to get the correct jQuery object.
<script>
var lnDotPos = document.domain.indexOf( "." );
if(lnDotPos>=0){
document.domain = document.domain.substr(lnDotPos+1);
}
tPos+1);
</script>then you can use:
try var oRendererExtensions = EPCM.getSAPTop().jQuery.sap.getObject("sap.ushell.renderers.fiori2.RendererExtensions");
oRendererExtensions.setHeaderTitle("Limited Edition Portal");
Hi all,
Even i need to implement the same.
Can you please suggest me that where do i need to upload JS file with
var oRendererExtensions = jQuery.sap.getObject("sap.ushell.renderers.fiori2.RendererExtensions");
oRendererExtensions.setHeaderTitle("Title Name ");
I mean how to call this js file (in which class ).
Do we need to add this in the Fiorilaunchpad.html or is there any way to add with out touching the standard code.
And also can you please tell me from where <title> home<title> is loading. Since i need to change the text "home".
Please suggest me.
Thanks,
bhaskar.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Try the following,
var oRenderer = sap.ushell.Container.getRenderer("fiori2"); oRenderer.addHeaderItem("sap.ushell.ui.shell.ShellHeadItem", {id: "testBtn"}, true, true);
Or the following:
var bar = new sap.m.Bar();
var oRenderer = sap.ushell.Container.getRenderer("fiori2");
oRenderer.showSubHeader([bar.getId()], false, ["home", "app"]);
This depends on your UI5 Version.,as it may not be available.
Best Regards,
Tal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.