We're wanting to put a floating quick/safe exit button on some pages so if the user clicks on them, it'll take them out of our site to a completely different one.
Has anyone done one before?
Solved! Go to Solution.
Views
Replies
Total Likes
Hi @LauraG not sure if I understood the requirement correctly. You can create a simple button component which extends core button and style according to your requirement. You can author this on which ever pages you want to show.
Hope this helps,
Krishna
Hi @LauraG not sure if I understood the requirement correctly. You can create a simple button component which extends core button and style according to your requirement. You can author this on which ever pages you want to show.
Hope this helps,
Krishna
If your requirement is to inform a user that they leave the website, you can add the "beforeunload" event listener into your main client library that will display the popup
(example here: https://dev.to/melvin2016/how-to-show-a-are-you-sure-to-leave-leave-site-etc-dialog-box-in-the-brows...)
But in my sight, it could be safer to have another special redirect page with that message, the same way it is, for example, on LinkedIn. And you can use that redirect page for all external links. (The resulting links will be something like /content/<project>/redirect.html?path=<originalUrl>)
You even can use something like LinkRewriter service to update all external links to this behavior, in order to cover all the components + custom links from RichText component. Or use rewrite on dispatcher side, if you have AEM on-premise. However, custom components that use javascript redirection should be covered in their (FE) code anyway, so maybe the first approach with JS event is better though.
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies