Html element with variables

1
Hi Forum,   I want to add a HTML snippet to my page with the option of inserting variables from an entity. Is there an option or widget whitch allow me to do so? Maybe with the javascript snippet?   kind regards,    Jasper 
asked
3 answers
4

Hi Jasper,

 

Looks like the HTML Element widget solves your problem:

 

https://docs.mendix.com/appstore/widgets/htmlelement/

 

 

Hope this helps!

answered
2

Hi there,

 

I’d personally recommend using the HTML Element Marketplace Module ( https://marketplace.mendix.com/link/component/204843 ). I’ve found it quite useful when wanting to add variables to HTML.

 

In my example, I’ve added the HTML Element widget to a data view to allow for dynamic colours on a page depending on the stored variable:

 

Hope this helps,

Liam

answered
1

Hi Jasper,

 

The HTML snippet doesn't accept variables from entities. Like you said you need to use the javascript snippet. Create a non persistant entity which you can use as context. https://marketplace.mendix.com/link/component/43096 

Hope this helps!

answered