Join the Webstudio community

Updated 4 weeks ago

Code logic on URL Query String

It would be highly useful to me if I could read a querystring param and use code logic with it.

For example, depending on the value...
Show or hide elements.
Set an element's text value
Change an element's background color
Change an img src
B
H
O
6 comments
Hey, you can already access search params with "system" variable
I saw that I can access them. I just haven't found any way to conditionally act on them. If p1 = x, do a; if p1=y, do b, if p2=m, do c, etc.
Hopefully I'm just missing something.
there is "show" setting in every instance you can bind condition with system variable to it
Or you can bind ternary operator with system variable to image src
Example expression that returns true or false and shows/hides the instance system.search.something == 'something'
Add a reply
Sign up and join the conversation on Discord