How do I access an HTML widget attachment in an IFRAME Tag in Velocity? I have tried the following, but it is not working. It is simply downloading the HTML file.
<iframe src="$core_v2_widget.GetFileUrl('index.html')">
</iframe>
How do I access an HTML widget attachment in an IFRAME Tag in Velocity? I have tried the following, but it is not working. It is simply downloading the HTML file.
<iframe src="$core_v2_widget.GetFileUrl('index.html')">
</iframe>
Instead of using a raw HTML file, use a VM file as your attachment along with GetExecutedFileUrl instead of GetFileUrl. Not only will this work as you're expecting, but you'll also be able to execute script and other APIs inside the framed content.
Widget Content:
<iframe src="$core_v2_widget.GetExecutedFileUrl('iframe.vm')"></iframe>
Widget Attachment: iframe.vm
<body> Test Content<br /> Current User: $core_v2_user.Accessing.DisplayName<br /> Current Time: $core_v2_utility.CurrentDate<br /> </body>
Thanks a lot.