Vev Help Center
Search…
Tips & Snippets
Get some good Tips & Snippets here on the Code Editor in Vev

Navigating to a page in Vev

To navigate to a page in Vev by pageKey, add this in your Widget function code.
1
const [route, dispatch] = useGlobalStore((store, dispatch) => [store.route, dispatch]);
Copied!
1
function navigate(vevPageKey:string) {
2
dispatch('route', {pageKey: vevPageKey:string});
3
// window.history.pushState(null, null, window.location.pathname);
4
// You may want to adjust window.history as well, depending on use-case
5
}
6
​
Copied!
​
Last modified 2mo ago
Copy link