add collection, query and render templates and sub templates