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
Hello,
Due to the number of items In a sub folder I have implemented Anthony Dang great Auto Folders project which is working well under ver 7.1.4.
However I now need to change a load on nodes to a differnet DocType.
I know you can manually change the content DocType thru the GUI but I have thousands to do and I need an automated solution / scripted etc.
The script needs to start at a certain NodeId and change all the children with a certain DocType to a new Doctype, whilst ignoring other node types.
Can this be done.
This feature is high on the list for Bulkmanager http://soetemansoftware.nl/bulkmanager. I hope to have something ready end of next week.
Otherwise loop over the items and change document type in code.
var node = ApplicationContext.Current.Services.ContentService.GetById(123); node.ChangeContentType(ApplicationContext.Current.Services.ContentTypeService.GetContentType("MyAlias")); ApplicationContext.Current.Services.ContentService.Save(node);
Best,
Richard
Actually,
I think I have figured another fix where I don't need to change the docType but I change the parent.
I'll try your code.
Thanks for the prompt reply
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
Change Doc Types "en masse" from a nodeID to apply to children
Hello,
Due to the number of items In a sub folder I have implemented Anthony Dang great Auto Folders project which is working well under ver 7.1.4.
However I now need to change a load on nodes to a differnet DocType.
I know you can manually change the content DocType thru the GUI but I have thousands to do and I need an automated solution / scripted etc.
The script needs to start at a certain NodeId and change all the children with a certain DocType to a new Doctype, whilst ignoring other node types.
Can this be done.
This feature is high on the list for Bulkmanager http://soetemansoftware.nl/bulkmanager. I hope to have something ready end of next week.
Otherwise loop over the items and change document type in code.
Best,
Richard
Actually,
I think I have figured another fix where I don't need to change the docType but I change the parent.
I'll try your code.
Thanks for the prompt reply
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.