Navigate to
The Navigate to
action redirects a user to an external URL or another page from your project. Changing page stops the workflow from executing anymore as a workflow execution is tied to a page.
Navigate to action
That's why it's often an action that you want to use at the end of a workflow.
Here are the options available in this plugin:
- The page you want to redirect the user to. You can select any page from your project, or use the binding that should return a page id.
- If your page has parameters, they'll be available here and you'll be able to set them. You can bind them to any value you want, as long as it's URL encoded.
- Here is the option to open the page in a new tab. It only takes effect on the published app (the editor will always open a new tab).
- Finally, you can set any number of querystring parameters here.
Bind page
The value of the page to navigate to can be dynamic.
To bind a page, you should use a formula that will return a page's id. You can find page ids from your project in the data explorer:
Page parameters
If you want to navigate to a page that uses parameters in its URL, you will be invited to define the value of its parameters.
In the example below, we have a Selected car
page with a product_id
parameter that expects the uuid
of the car in our database:
On our homepage, we have a list of cars. When the user clicks on a car, we want to redirect them to the Selected car
page.
In order to do this, we select the Selected car
page and bind the product_id
parameter to the uuid
of the selected item:
TIP
Page parameters are helpful to create dynamic collection pages. In our use case, we could now have a workflow On page load
to fetch the selected car:
The car fetched would depend on the parameter in the page URL:
Learn more about working with dynamic collection pages in WeWeb.
Query string parameters
On the Navigate to
action, you can setup any number of querystring parameters that you want. They are composed of keys and values, values being bindable.
Then, on the redirected page, you can use these queries in any workflow.
In the example below, we make a REST API call on page load that calls an endpoint with the value of our query string to fetch that item in our database: