I would like to have an if statement (or something that does the following) inside smarty's include tag. I have the following containing tags:
{include file="controls/control_input.tpl" //some other smarty variables mask=$itemType->mask mask=$field['mask'] }
My goal is that if field["mask"] = to "", then mask is set to itemType->mask, otherwise it should be set to field["mask"]. However, I can't seem to add an if statement inside the include tag.
You can use if else condition before including the template file and then pass the mask variable inside the include tag as shown below,