This has broken tests and the old templates.

a simple fix would be to test for config ckan.legacy_templates and then decide what to do