Query parameters in url

I have variables as shown below. What is the explanation for the fact that I can access both pages with query parameters in Staging environment, but not in production for the one that I created recently? (I can see parameters on the page created 1 month ago) When I look at the related topics in the forum, it is recommended not to use url path. That’s why I am trying this way. Is it bug caused by WeWeb or am I missing something? Is there a period of 30 minutes, 1 hour or a few days after publishing? In order for the URLs to be updated in a way that can come with parameters. Or do you need to make settings from a different place to display the parameters in the urls, such as project settings?

image

image

Hi @mert.incesu :wave:

Can you provide us with more information about how things are set up at page level, maybe record a short video?

Not sure where you read this but there are pros and cons to both approaches (URL path and query) as detailed in this academy video about dynamic collection pages.

Nope, the change should be live as soon as the app finished publishing.

I’m not sure how things are set up on your side. If the academy video above doesn’t help, could you record a video so I can better understand what you’re trying to do and hopefully point you in the right direction?

Looking through the video but I could find anything that talks about the difference between using url parameters in the format https://domain/page?param1=value1&param2=value2 and using a unique page ID through a parameter.

I’m trying to set up a filter that generates query parameters in the url so that way I can send a QR code that links to a specific search or users can share a specific view or search.

Since parameter are internal to the app there is no need to pass parameters through a url string if the user is navigating through the site. Once the link is shared we would need to pull the parameters from the url string.

Figured out how to add a “parameter” to the url through the page settings but that just adds text to create a unique page name.

How can I create a set of proper url parameters that I can use to set variables?

No update on this from the weweb team ?

Hey @benFortunato @liam_putra

Sorry for the delay, hope this answer martches what you are trying to achieve!

To access page parameters, you have access to them in the Formula panel:
CleanShot 2024-07-24 at 15.39.50

Here is how to set Query parameters

  1. You can set query variables from the Data/Variables panel.
  2. When you do that, from any link, you can set those variable by adding an item in the Queries section. Or set the value directly from the url.
  3. On the page where you want to use the value of the query param, you can bind the variable as you would with any variable. Or use the query variable in Browser/query/yourParam.



2 Likes

I would add to this a quick tip that triped me up. If you create a page that needs query parameters to load, it won’t show up in the weweb editor unless you manually put those parameter in the URL bar. For example if you have the parameter Myparameter1=value1 you will need to navigate to the weweb editor page and manually append those to the URL. For example: https://weweb-editor-url should be https://weweb-editor-url?myparameter1=value1&myparameter2=value 2

When you hit enter the page will reload and weweb will be able to load the parameter from the browser into the editor just like it will when you publish the site.

Hope that helps, that took me a while to figure out.

1 Like

hmmm… how did you avoid that ?

it might not take too much time to keep manually append those parameter on the URL, just wondering if theres more an automated solution ?

thanks man @jptrinh

I modified my previous answer a bit. Got mixed up with Page parameters and Query parameters!
If you want multiple query parameters, you should use the second method :slight_smile:

And you can set a worfklow and change the value of your query variables to quickly set them!