CodePlexProject Hosting for Open Source Software
I would like to create ContentType dynamically. Is it possible? I saw that there is a ContentTypeRecord class but I have no idea if I can use it to create a ContentType and How I can do it.
Thanks in advance.
You can do it through Migrations?? i.e.
ContentDefinitionManager.AlterTypeDefinition("Thread", cfg => cfg
That dynamically create a Thread ContentType
But, In this way I need to have already the ContentType. Isn't it? Instead, I would like to create the contentType on module activation. If it is possible.
Thank you very much for the reply.
When you call .AlterTypeDefinition("Thread"), it will create the content type if it doesn't already exist. Nick's example is exactly what you need when you implement it as part of a migration class.
Ok, Thank you very much. It is exactly what I need. Thank you very much!
Are you sure you want to delete this post? You will not be able to recover it later.
Are you sure you want to delete this thread? You will not be able to recover it later.