Use wixLocation.to with page ID

Hi following this post https://www.wix.com/corvid/forum/community-discussion/how-to-get-a-permalink-to-a-page

I would like to have the ability to redirect to a page based on its Id rather than it’s URL. That would make our app more resilient to change!

Page name and page URL can be changed via the UI and someone not aware of the linking will break the link.
It will also help while developing a project where you don’t know the final URL of all pages.

Finally, it’s a good practice embraced by many web system.

  1. Its that something interesting?

  2. Is it doable?

2 Likes