Getting a link inside of a Frame to trigger a regular Turbo.visit

I have a series of links inside of a TurboFrame and would like them to trigger a page visit outside of the frame. Setting the target of each link to _top works fine, but it reloads the entire page, assets and all. No TurboDrive goodness.

Am I missing something obvious? I’m looking for a way to get a link within a Frame to navigate to a new page, but while maintaining all the default TurboDrive functionality.

1 Like

If I’m understanding the Turbo documentation, it sounds like the desired behavior can be achieved by using data-turbo-target=“_top” in place of target=“_top”?

1 Like

It is data-turbo-frame="_top" will navigate the main page but It is confusing that target: “_top” just navigates without turbo and in the handbook they say to use target:" _top" instead
I wonder why `https://github.com/hotwired/turbo/issues/323

See section Targeting Navigation Into or Out of a Frame including the 2 examples. It illustrates when to use <turbo-frame target=“_top” vs <a href data-turbo-frame="_top".

alright now I see the purpose of target: _top vs turbo-frame: _top in a scenario where you don’t want to use turbo at all