Join the Webstudio community

Updated last month

Using Data Variables to Manage Link Destinations

At a glance
I have a question about data variables.. why can I not use a data variable that I created in the body in links?

I created a data variable called registrationLink and set it as string and set the value as the final destination link that I want the users to divert to (this is an external link)

I have a landing with multiple buttons and I want to bind the url to this registration link so that when I update the registrationLink once, it updates everywhere..

Obviously I am doing something wrong / or I don't really understand the purpose of data variables.

How can I achieve this, where I update the link once and it gets updated everywhere?

It's on a single landing page within the body
s
B
4 comments
ooof. so I realised I cannot set it in Slot components.

Works properly else where.
Slots are reused across different pages so they cannot access variables on one particular page
Though we will add support for global variables inside slots soon.
Yup! Got it! Thanks!!
Add a reply
Sign up and join the conversation on Discord