cancel
Showing results for 
Search instead for 
Did you mean: 

Fiori Launchpad Tile with Semantic Navigation that includes a route...Is it possible?

MattHarding
SAP Mentor
SAP Mentor
0 Kudos
2,242

I have a requirement to have 2 tiles in the launchpad that open the same app, but a different view in this app (2 separate routes). While I could implement a startup URL parameter in the app itself and configure this in each tile, I'm hoping there is a way of taking advantage of the existing routes that are already configured?

Unfortunately, I haven't found an easy way to do this and thought I would ask before falling back to startup URL parameters.

Anyone know if this is possible?

Note - I'm configuring this on an on-premise Fiori Launchpad.

Cheers,

Matt

Accepted Solutions (0)

Answers (3)

Answers (3)

jprovost
Explorer

Hi All,

The code free way to do this is to put the route pattern (actually '&/ + pattern'), from the manifest, in the 'Parameters' field of the tile definition, in the Launchpad Designer:

Magical!

MattHarding
SAP Mentor
SAP Mentor
0 Kudos

Thanks Joel. The &/ is pretty cryptic but now known - sounds great!

0 Kudos

Hi Matt,

i think you can use the target setting with "shellHash" for your case.

Ex:

var oCrossAppNavigator = sap.ushell.Container.getService("CrossApplicationNavigation");
oCrossAppNavigator.toExternal({
   target: {
      shellHash: "{SemanticObject-action}?someParam=abc&/{route-pattern}"
    }
});

Hope it helps.

Cheers

Cuong

MattHarding
SAP Mentor
SAP Mentor
0 Kudos

Hi Cuong,

Thanks for the input and the above would work if I was navigating within a Fiori app (or writing a Fiori Launchpad extension) but what I'm after is a code free way of configuring the Fiori Launchpad Tile/Target Mapping.

Cheers,

Matt

Hi Matt,

may be I did not understand your requirement exactly.

But that worked for me in my project to do the cross app navigation. I could navigate from one Fiori App (Tile) to another one, not within the same App.

Best

Cuong

MattHarding
SAP Mentor
SAP Mentor
0 Kudos

Hi Cuong,

Apologies if it wasn't clear as I can now see how "tile" can be misinterpreted. What I was referring to was the config for the Tile in the Fiori Launchpad calling a different route. Oddly enough, I've practically asked the same question over 2 years ago (thinking that this should be a standard feature) but there seems to still be no answer that doesn't involve UI5 coding:

https://archive.sap.com/discussions/thread/3697844

In other words, imagine having 2 tiles on the Fiori Launchpad - they both launch the same app, but with different routes.

Anyway, will most likely go with URL parameters since I know that works.

Cheers,

Matt

0 Kudos

Hi Matt,

it gets clearer now 🙂

In my project, we almost use the same technique by setting startup parameters.
However, we delegate the route decision logic to the backend.
Correspoding to the startup parameters, the Customer uses SPRO to customize the appropriate XML-View name in the backend. Then, frontend will route to that View received from the oData Service.
By doing that, customers can change or add more Views later on their own by only configurations. They don't need to modify the original UI5 code.

I would be happy to hear new easier approach to your requirement too.

Cheers

Cuong

EkanshCapgemini
Active Contributor
0 Kudos

Hello Matt,

I have exactly the same requirement. Did you find any solution which does not involve handling startup parameters and utilize Route config directly?

Regards,

Ekansh

MattHarding
SAP Mentor
SAP Mentor
0 Kudos

Hi Ekansh,

I went with URL parameters in the end - but maybe they'll take care of this in the latest 1.52 release? Hopefully but not holding my breath!

Cheers,

Matt

EkanshCapgemini
Active Contributor
0 Kudos

Hello Matt,

Thanks for your response. After much research, even I am going with parameters defined in target mapping (this has an advantage over passing them from tile that these are not shown in URL) and navigating to route based on these.

However, this approach leads me in some trouble with back navigation as in History object there are two entries now (1st is "" and 2nd is my actual route) and navigating to windows.history.go(-1) leads to the homepage of app instead going back to Fiori launchpad.

Is there anyway we can request this much desired feature to SAP?

Regards,

Ekansh

MattHarding
SAP Mentor
SAP Mentor
0 Kudos

Hi Ekansh,

You've probably figured out by now that when you navigate, you can set a flag (2nd parameter I believe) to not add it to the history but if not - that's your answer.

Cheers,

Matt

ivo_skolek
Participant
0 Kudos

Answer from Joel works perfectly, just wanted to add - I needed to do this now for static tile and through App Manager. There it doesn't allow to put URL parameters as string but rather as a name value pair. Also the parameter name is mandatory. I tried and this worked - router parses is properly and app lands in the desired view:

ivo_skolek_0-1727087664231.png