Hi there!
I realize that most of the clients, when they create a new resource from the manager, they made it by right clicking on the left tree ( on the parent element ) > Create > Creat a document here.
The good thing: the new document have the parent assigned, the bad thing: the template assigned is wrong, the new document have the template of the parent resource, not the corresponding template of the child resource.
Ok, i realize that this can be fixed with rules, in the form customization section, creating a new set, action: create resource, Constraint Field: parent, Constraint: the parent id, set the default template to the child template id, and this fix this issue.
But, this can be done with parents ids, but what happen if i want to apply this to parent documents that the client add? For example, the parent is categories, and the client can add categories...
My question is:
Is there a way to set the constraint field pointing to the parent template assigned? For example: parent-template = 3
So the rule is applied to all documents in which his parent has applied certain template. This gives consistency.
I explain correctly?
thank you!
Sebastián.
[ed. note: zzseba last edited this post 11 years, 10 months ago.]
You could create a plugin for OnDocFormSave, which sets the template, depending on where they create resources/containers