Hi Community,
I'm working with Creatio Freedom UI and I need to embed a custom HTML layout along with some JavaScript logic (e.g., loading an external widget) into a page.
I’m looking for a proper way to add both:
-
Custom HTML code,
.......
</head>
<body>
<div style="width: 100%;">
<div id="xyz1"></div>
<div id="xyz2">
<div style="width: 100%;">
<div id="queryBox" style="width: 100%;"></div>
</div>
<div id="xyz3"></div>
</div>
</div>
</body>
</html>
- External or inline JavaScript code (e.g., via
<script>
tags)
I've tried using custom components and inserting HTML using JavaScript (e.g., innerHTML
), but I'm unsure if this is the recommended approach or if there's a native method provided by Creatio.
Could someone please guide me on:
- The best practice for injecting HTML/JS into Freedom UI pages
- Whether I can safely reference external JS/CSS (like from a CDN)
- Any Creatio-supported way to dynamically render and control such elements
Thanks in advance!
Any documentation links or working examples would be really helpful.
Regards,
Ajay Kuthe
Like
Creatio does allow you to create your own custom UI components that you can add to the UI and even handle requests, read data, bind properties, etc. Documentation here on creating custom components: https://academy.creatio.com/docs/8.x/dev/development-on-creatio-platform/category/freedom-ui-component
Video tutorial here: https://www.youtube.com/watch?v=CE5uETqTsyQ&list=PLnolcTT5TeE2BMFf_XmJrSwpnbcLCLJkb
A simple approach (with limited capabilities compared to creating a full control) can be seen here: https://customerfx.com/article/embedding-an-iframe-on-a-creatio-freedom-ui-page/ (you could use this approach to render any HTML, not just an IFRAME as the article shows)
Ryan