Join the Webstudio community

Updated 2 months ago

Adding static text before Expression editor

At a glance

The community member is new to the expression editor and wants to know how to add some static text before a dynamic value. The comments suggest using template literals, providing an example of Example Text ${PostData.data.data.post.date}. Another community member notes that the backticks may not have been properly displayed due to a limitation of the platform. The issue is resolved, and the community members thank each other for the help.

Useful resources
New to expression editor. How can we add some static text before the dynamic value in expression editor (For example: Published on)
Attachment
image.png
1
B
m
J
5 comments
Plain Text
`Example Text ${PostData.data.data.post.date}`
@John Siciliano, I was reading the docs and see that the backticks didn't get added into the statement. Maybe that's a limitation of gitbook? But if they could be added, it might be helpful in this situation.

https://docs.webstudio.is/university/foundations/expression-editor#expressions
Attachment
CleanShot_2024-11-05_at_13.39.252x.png
Thanks! Fixed
Attachment
image.png
Add a reply
Sign up and join the conversation on Discord