better templating for subviews