add categoryId to the template