Manage context for templates.