Join the Webstudio community

Updated 2 months ago

expression editor

At a glance

The community members are discussing issues with using the expression editor, specifically how to add system.params.slug to a RESOURCE query. The comments suggest trying different approaches, such as removing the part after system, using backticks instead of single quotes, and deleting a backslash n. Eventually, the issue is resolved, and one community member notes that the syntax is related to JavaScript template literals. Another community member mentions that this discussion has sparked an internal discussion to improve the expression editor experience, and provides a link to a related issue on GitHub.

Useful resources
the expression editor is very frustrating to use, how do I add system.params.slug into my RESOURCE query?
f
c
O
22 comments
what am i doing wrong
Attachment
Screen_Shot_2024-10-01_at_5.19.09_pm.png
Delete the part after system
then try again
Oh wait, see that backslash n?
just for trying
I think the quotation marks are causing the issue
Oh yes, you´re using ' instead of `
thats stupid lol
For those with no js knowledge I guess it will require a ui with 0 code.
Actually this thread sparked an internal discussion and now we know how to improve this experience, follow this issue for updates https://github.com/webstudio-is/webstudio/issues/4186
Add a reply
Sign up and join the conversation on Discord