The community member has a question about using data variables in links. They created a data variable called registrationLink and set it as a string with the value of an external link. They want to use this variable to update the link in multiple buttons on a landing page, so they can update the link in one place and have it update everywhere. However, the community member is unable to use the data variable in links, and they are unsure of the purpose of data variables.
The comments indicate that the community member cannot set the data variable in Slot components, as slots are reused across different pages and cannot access variables on a particular page. However, the comments also suggest that support for global variables inside slots will be added soon.
There is no explicitly marked answer in the provided information.
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?