When creating a context, default, layout or a template for a view you have to do the same steps.
- create a control procedure
- generate the code group
- search the task/view/subject in assigning
- assign the template
8 out of 10 times this can be automated if you add only 1 template and use the standard naming standards for templates and control procedures.
I would suggest adding several tasks:
- on tasks: a task to create the template and assign it to the task
- on subjects: a task to create the ctx/def/layout (checkboxes which you want to create) and assign it to the subject
- on data model (view): a task to create the template and assign it to the view when the view is template based.
All would follow standard naming protocols.Also the tasks should check if there is already a template.
Optional: use a process flow to open the just created template so you can start coding.