adapted to templates from CKAN 2.2