Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.
SOLVED

Force hyperlinks in HTML article to open in device browser

Avatar

Level 4

I have several HTML articles that work great in AEM Mobile. But some of them contain links that we would like to open in the device browser, instead of the built-in app browser. Is there any way to do this?

1 Accepted Solution

Avatar

Correct answer by
Employee

Hi Keith,

When you create a standard <a href> link in an HTML article, the link opens within the app.

Example: <a href = "http://www.google.com/">Google In App</a>

If you want to open the link in the external browser, use the goto:DeviceBrowser?url= format:

Example: <a href="goto://DeviceBrowser?url=https://www.google.com">Google External App</a>

-Bob

View solution in original post

3 Replies

Avatar

Correct answer by
Employee

Hi Keith,

When you create a standard <a href> link in an HTML article, the link opens within the app.

Example: <a href = "http://www.google.com/">Google In App</a>

If you want to open the link in the external browser, use the goto:DeviceBrowser?url= format:

Example: <a href="goto://DeviceBrowser?url=https://www.google.com">Google External App</a>

-Bob

Avatar

Level 1

Hi Bob -

 

How would you set up this HTML code with styling? Also, will this still allow the link to work on non-mobile browsers such as PC or MAC?

 

style="padding: 13px 35px;font-size: 22px;white-space: nowrap;line-height: 22px;text-decoration: none;background: #00b2ad;border: 1px solid #00b2ad;color: #ffffff;box-shadow: inset 0px 1px 4px 0px #ffffff;border-radius: 4px;

 

Thx 

Avatar

Level 4

Hey thanks Bob! I never noticed this one in the docs. Its there, I just missed it. Thanks for pointing it out.