Guide on how to hide data based on values in HTML templates.

Guide on how to hide data based on values in HTML templates.

I am amazed that I discovered this after couple of hours of trial and error. Not sure why, but it works.

*[data-hide=" "] {
display:none;
}
*[data-hide="\A0"] {
display:none;
}
<div data-hide="%ItemDescription%" >
%ItemDescription%
</div>
If %ItemDescription% will have empty value in your module then this DIV will receive "display:none" and won't be visible. Both of thees rules need to be present for this to work, I really cant explain why. Maybe someone has more insight. As far as I can see the parameters are never really empty (I wish that was the case), but they will output a single whitespace.