How do you create a complex data type without resorting to using document types?
I have a requirement for a document type to have property that itself has multiple properties. I don't want to use a document type, because it's not a document. But I'm not sure what the best way of storing in the database would be. I am considering serializing the value to JSON or an XML-fragment.
How do you do it, and what should I (as a developer new to Umbraco) be aware of?
Have a look at the MultiType Datatype. It allows you to create a property that has multiple properties though they can only be simple types, I haven't gotten round to allowing more complex types.
If you do decide to create your own then I recommend geting the source for uComponents and having a look at some of the components.
Creating complex DataTypes
How do you create a complex data type without resorting to using document types?
I have a requirement for a document type to have property that itself has multiple properties. I don't want to use a document type, because it's not a document. But I'm not sure what the best way of storing in the database would be. I am considering serializing the value to JSON or an XML-fragment.
How do you do it, and what should I (as a developer new to Umbraco) be aware of?
Hi Michiel,
Have a look at the MultiType Datatype. It allows you to create a property that has multiple properties though they can only be simple types, I haven't gotten round to allowing more complex types.
If you do decide to create your own then I recommend geting the source for uComponents and having a look at some of the components.
Ben
Wow, looks like just the thing I need...
Thanks!
is working on a reply...