On this page
( https://support.wix.com/en/article/corvid-creating-data-hooks-for-dynamic-pages ) is shows an example of using a data binding router hook (afterRouter) on a “dynamic” page to rout a visitor to 2 different pages based on a picture size. From what I read when you use the response.ok function and enter a page name to redirect to, that page name needs to be a router page with the same router prefix. My problem is that I have a list of dynamic pages under the prefix “facilities” but I can’t create router pages under this prefix. So I can’t route to another page. I’m sure that missing something pretty simple here, but I can’t seem to find the answer.
Figured it out.
May I ask what is the solution to this?
Found the solution. Actually can route from one dynamic page to another dynamic page, as long as they are under the same set of dynamic pages
Each dynamic page has a page name. Page name is the name that appears at the side bar. Route with ok( ) function to that page https://www.wix.com/corvid/reference/wix-router/ok when writing the afterRouter( ) function
In order to set multiple dynamic pages under the same set of dynamic pages, you need to set these dynamic page URLs unique
https://support.wix.com/en/article/making-multiple-dynamic-page-urls-unique
e.g.
http://www…/recipes/meals/{meal}
http://www…/recipes/courses/{course}
thanks a lot for the solutions!