Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I have a Doctype that has 4 Templates assigned to it. This Doctype has NO default template assigned. The Doctype also has a Property (named 'Type') assigned to it using a Datatype I created. The Datatype is a radio list with 4 values. The values are the aliases of the templates assigned to the Doctype. I'm trying to find a way for Umbraco to automatically assign one of the four allowed templates to the created node based on the selection of the Property 'Type'. For example, if a user selected the first option in the radio input, the Doctype would be assigned the template with the corresponding alias programmed in the Datatype.
Is this possible? I'm thinking a custom codebehind script might handle this. Ideas?
It sounds like you might want to hook into the ContentService.Saving event. In the event handler you'll be able to check the property values of the nodes being saved and modify whatever properties you need.
here is a similar post with a solution:
You need the ContentService and FileService.
Robert here is a good video in the service api's
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted