cancel
Showing results for 
Search instead for 
Did you mean: 

Hiding the page bar in a page initialisation event

JBARLOW
Contributor
0 Kudos

Hi all,
Just looking for a bit of syntax help,

Using an optimized story I'd like to be able to hide the page bar menu when the page initialises,
the code below works if I paste it into the browser - the story opens with all menus removed.

https://my-tenant.cloud.sap/sap/fpa/ui/tenants/13013/app.html#/analyticapp?shellMode=embed&/aa/6D839...;

Just wondering how I get it to work in a script, just can't seem to get it right when using the usual code to set view/embed etc with the NavigationUtils / URL create parameters.

For reference launching a story/app in embed mode I use:

NavigationUtils.openApplication(Application.getInfo().id,UrlParameter.create("mode", "embed"), false);

Accepted Solutions (1)

Accepted Solutions (1)

JBARLOW
Contributor
0 Kudos

resolved it using the following syntax

var APP_ID=Application.getInfo().id;

if (Application.getMode() !== ApplicationMode.Embed){
NavigationUtils.openUrl("https://my-tenant.hcs.cloud.sap/sap/fpa/ui/tenants/13013/app.html#/analyticapp?shellMode=embed&/aa/"+APP_ID+"/?pageBar=disable",false);
}


Still annoying that you have to perform a double load of the story - maybe one to add to SAP influence
'hide page bar' in view mode option

Answers (0)