Add support for settings in output templates.

This way we can register a template so that it gets generated only for certain event types.