Dynamic macros: Links are opening within the iFrame of the macro

Hey,
as the title states, when inserting any kind of link into a dynamicContentMacro, the default behaviour is that this opens within the iFrame, rather than the entire window.

I’ve tried working around that by tempering with the eventListeners on all ‘a’-tags, preventing the default event and calling the AP.navigator instead. This works for most links, but there’s constantly new issues coming up, like live search not working correctly.

This also feels like a super hacky way. Is there a better way to get this to work?

Hi @PhilipFeldmann,

Pretty sure what you wanna do here is one of those:

<a href="..." target="_top">Open link in iframe parent</a>
<a href="..." target="_blank">Open link in new tab</a>

Cheers,
Sven

3 Likes

Wow Sven, I’ve posted the question and saw you replying just 3 seconds later. Amazing, thank you :smile:

Also works for forms, which I was initially looking for.

3 Likes