support passing in a custom template