add more flexible context for template.