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'm trying to find out how to force node to create only one node child of other type ?
I have 'hotel' node and i want to add one 'rooms' node and one 'facilities' node ('rooms' create 'room' and 'facilities' create 'facility')
I prefer to do it with the management system (if possible) but code behind be good also !
Thanks in advance for all helpers!
Hi kfir,
You can't create rule that only one child node of some document type can be under the current node, but you can subscribe on create node event, check what type is it, and decide can you create one more or no.
Read about Umbraco content service events:
https://our.umbraco.org/documentation/reference/events/ContentService-Events
Saving event looks like what you need.
Thanks
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Create default childs to node in umbraco
I'm trying to find out how to force node to create only one node child of other type ?
I have 'hotel' node and i want to add one 'rooms' node and one 'facilities' node ('rooms' create 'room' and 'facilities' create 'facility')
I prefer to do it with the management system (if possible) but code behind be good also !
Thanks in advance for all helpers!
Hi kfir,
You can't create rule that only one child node of some document type can be under the current node, but you can subscribe on create node event, check what type is it, and decide can you create one more or no.
Read about Umbraco content service events:
https://our.umbraco.org/documentation/reference/events/ContentService-Events
Saving event looks like what you need.
Thanks
is working on a reply...