Hello @se.belobrov
I understand your frustration, and we are sorry about this. While we genuinely want to help, please don’t use the community for venting. We aim to keep this space friendly and focused on solutions. This is a message to all community members.
Moreover, If you are stuck, you can contact support or come here, we also hold office hours. That being said, what you are trying to accomplish is easier in WeWeb than using custom JS and it can be done in less than 2 minutes.
There are two ways to manipulate URLs: using URL paths and query variables.
URL Paths:
URL Paths are the parts of the URL that come after the domain name and before any query string, separated by forward slashes. They represent hierarchical data or resources:
“users/123/posts”
When you add a page, you’re inviting to set the URL path by passing a dynamic parameter:
When navigating to the page from another page, whether it be through using the Link to property or the Navigate to action, you will then be able to pass the ID
You can use “Link to” or ‘‘Navigate to’’ in order to navigate to the same page or a different page and pass the ID as a parameter
You will then be able to retrieve the variable in the dynamic page. Furthermore, you don’t need to create and bind a new variable, it’s already provided:
Query variables
Query variables are parameters added to a URL after a question mark (?) that provide additional information for filtering, sorting, or changing the page content. They use key-value pairs in the format ?key=value
You can create a variable of type query:
This variable will hold whatever value you pass to the URL, let’s say you have a URL /gallery?currentSelection=123, the variable will automatically be set to 123
To manage navigation using queries in WeWeb, it depends whether you stay on the same page or not:
- If you change the page, you can use the Link to property or create a workflow with Navigate to
- If you stay on the same page, you need to use the Change variable value action
If you do that, it will work the same way in the editor and published app
Let me know if you are still stuck or if something is not working. We are here to help, but since I don’t know the specific details of your project requirements, I might be missing something here.