Change URL when clicked

Hi, is it possible to change the URL when a button is clicked and popup is displayed, without redirect? Like instagram web.

If possible how can I do it?

Hi, yes it possible because WeWeb is SPA

To do that with WeWeb, you need to create one page with your content and your button in one section. You create a second page with exactly the same content and button as an instance. After that, you add your popup to the second page. Finally, on the first page, you add an event on your button to change the page and go to the second page. And because WeWeb is an SPA, it won’t reload all the content and only add your popup and change the URL :slight_smile:

If you need more information to understand, don’t hesitate to read this documentation about SPA: SPA (Single-page application) - MDN Web Docs Glossary: Definitions of Web-related terms | MDN


Thanks so much @Mael I did that and very cool.

However I still can’t figure out how to replicate like instagram. Where when you clicked an image it opens a popup and change the link, and you can go back to previous page where you left off,

But if you go to the link or refresh, it opens a different layout(the background is removed, and another component exist).

How can I replicate that?

1 Like

I think the best way to do that is to use a global workflow.

You can use a variable firstPageId, and two layouts for your page. The layout is different if the variable is your page with all your picture or if it’s a refresh


Thank you I will try that