I have a basic two-pane content page:
<div>
<turbo-frame id="toc">...</div>
<turbo-frame id="content"><a href="/wiki/some-topic">Some Topic</a></div>
</div>
/wiki/:topic
returns:
<turbo-frame id="toc">
Some Topic's TOC (a bunch of anchor hrefs with data-turbo="false")
</div>
<turbo-frame id="content">
Some Topic's contents, which includes more links like the one above.
</div>
But with it set up like this, two things I want aren’t happening:
- Only
turbo-frame#content
is getting its contents replaced. - The address bar isn’t updating to
/wiki/some-topic
.
For 1., should multiple frames be updating if I return multiple turbo-frame
values, even if it’s not from the frame that invoked the request? If not, how do I go about making one frame’s navigation events update another frame’s contents? Do I need to use Stimulus 2.0?
For 2., how do I go about debugging why it’s not updating the url? I can see the src
attribute on the turbo-frame#content
does have the right url.
If I can resolve these two things, then I can ditch an entire SPA!
Thanks!