Can anyone help with the correct syntax for what I'm trying to achieve?
I need an IF statement with the correct syntax please.
I have a .phtml template and want to display html code containing a custom attribute value. This is working fine, but I only want to display the html and attribute values if the attribute contains a value.
The reason for this is that I have a style on the li within the ul code that displays an icon. Currently if there are no attribute values, the div, ul and li code still displays and so does the icon.
My current code needs an If Then Statement so that if the attribute value is empty, the page displays an empty div. So something like: If then display an empty div Else display my code and the attribute vales. It kind of works now, but because I have a style that displays an icon on the tag, I don't want to display the div, ul, li code.
See the tick in the image.