How to conditionaly add an attribute in the template after checking if a variable is defined? I want to add an attribute with the variable value to an HTML tag, but this var