Update templates for if/loop to include $ before variable