Add extra context for templates

Fixes #27