Hi Patrik,
Since the HTML IFrame is real IFrame, the normal way to communicate with it is by sending messages. Basically what you need to do is:
On the page side:
- get the relevant data from the collection via dataset
- send message to the iframe with the content you want to load
On the iframe side: - add listener for messages
- on message - to take the sent data and to load it into the body (or wherever you need it in the iframe)
Here is more details on how to work with HTML components and some examples: HtmlComponent - Velo API Reference - Wix.com
[see the example for the postMessage() - it sends " Message from page code! " text to the IFrame and it is then displayed in the IFrame’s demo element. You might want to replace the whole body in your case, but the idea is the same)
In order to get the current item in the dynamic page, you need to use this API:
*You might get some additional info from this article:
“Working with the HTML Element in Wix Code” - Velo: Working with the HTML iframe Element | Help Center | Wix.com