Hello there,
I want to make a toggle button which can be used to switch between two tangible templates by using JS. I coudnt figure out this.
Hi Zakir, I’ve asked a similar question before and you can read the reply here:
I achieved my work by using Switch and when by adding and removing query from URL. I have used links to switch from one template to another, so that it can also refresh the page.
<a href="?type=QUIZ"> Quiz MODE</a><hr>
<a href={Url}> READ MODE</a>
<Switch check="{Url query=type}">
<When value=QUIZ />
<Template id=176 />
<When />
<Template id=232 />
</Switch>
3 Likes
That’s a smart solution as it allows any template to be changed on the page with a simple click and refresh.
1 Like