Join the Webstudio community

Updated last month

Bindings in a custom html element (HTML embed)

At a glance

The community member is working on a client project that requires adding multiple HTML audio players to a page. The audio files are stored in a CMS, and the community member is having trouble adjusting the src URL within a collection to use the collection item path and a base URL. The community member is asking for help on how to achieve this.

In the comments, other community members suggest wrapping the expression in backticks, such as `<blah></blah>`. One community member says this is the "perfect" solution and thanks the others.

Hey,
I'm currently working on a client project and I have to add multiple HTML audio players to the page. The audio files are stored in a CMS. The audio elements are easy to set up with a static source but I don't get how I can adjust the src url within a collection and then use the collection item path as well as a base url. Adding it right at src="" doesn't seem to work. Does anybody know how this could work?
Attachment
Bildschirmfoto_2025-01-03_um_22.20.18.png
J
O
j
5 comments
wrap the expression in backticks
Plain Text
`<blah src="${myvar}"></blah>
Plain Text
`<blah src="${myvar}"></blah>`
perfect, thank you! blah
Attachment
Bildschirmfoto_2025-01-03_um_22.51.01.png
Add a reply
Sign up and join the conversation on Discord