Question

Adding extension ID to hyperlinks in Extension Framework applications

  • 13 November 2022
  • 0 replies
  • 19 views

I am making an web application using the Looker Extension Framework. It contains several links (routes) for different pages to be rendered.

Since those are links, they could be opened as a new tab or window when mouse is right clicked on it. However they are relative links and extension ID is not added to it when opened independently. For example if the link is “/hello”, the URL will become “https://mylookerinstance.com/hello” which leads to a 404 error.

 

I have tried BrowserRouter to make the basename to be “/extensions/my-extension-id” but since my application is already rooted at “/extensions/my-extension-id”, clicking the link locally (not opening it as a new tab) would not work anymore as it would become “/extensions/my-extension/hello”, not “/hello”.

 

Is there anyway to add extension ID to it so that the link could become “https://mylookerinstance.com/extensions/my-extension-id/hello”? (my-extension-id will be something like “my-project::my-application”.


0 replies

Be the first to reply!

Reply