Vorbly <Code>
CODING MADE EASY WITH VORBLY
WIX CODE LINK TWO DYNAMIC PAGES
Need to link two dynamic pages? This tutorial will show you how to link two dynamic Wix pages using Wix Code. You can now link two dynamic pages (different databases) to each other. We will provide you with the webpage elements and sample codes required to implement this feature.
THE DEMO
THE ELEMENTS
Dynamic Page 1
Dynamic Page: /Tours/{tourid}
Text Elements
-
Tour Name: #title
-
Tour ID: #tourid
-
Tour Availability: #tourdates
Wix Repeater
-
Tour Details: #repeater1
Button Elements
-
Book Now Button: #BookNow
Dynamic Page 2
Dynamic Page: /OrderForm/Tours/{tourid}
Text Elements
-
Tour Name: #title
-
Tour ID: #tourid
-
Order Form Information: #OrderInfo
User Inputs
-
Customer Name: #name
-
Customer Email: #email
-
No. of Guests: #guests
-
Tour Timing: #timing
-
Comments: #comments
Button Elements
-
Book Now Button: #BookNow
The Database
Create databases for your dynamic pages and.or order forms.
Include fields like tour name, tour description, Google Maps, images, etc...
THE CODE
Page Code
// Paste code in first dynamic page //
import wixLocation from "wix-location";
export function BookNow_click(event, $w) {
let tourid = $w('#tourid').text;
wixLocation.to("/OrderForm/Tours/" + tourid);
}
COMMENTS
I'm a paragraph. Click here to add your own text and edit me. It's easy.