Add conditionals to View class for string-based templates