Thank you for trying our framework. I'll paste a post from another thread that is hopefully answer to your question:
About custom data types - those are not directly supported by our framework in a way that you can create data types through Visual Studio and have them deployed automatically. You must create your data type directly through browser in Umbraco as you always did. However, you can declare document type property in your class to be of that newly created data type as following:
In this example you declared property 'MyProperty' which is of 'MyCustomDataType' data type. What I did in this example is tht I set property type to UmbracoPropertyType.Other and set OtherTypeName to name of that custom data type. Note that string value of MyProperty during runtime will contain actual value of this data type (usually xml).
Furthermore, instead of declaring property as string MyProperty you can declare it with your own .NET type (instead of string) if you build appropriate convertor (class that implements Vega.USiteBuilder.Types.ICustomTypeConvertor so that you don't hasle with xml every time when you use this property). But we'll explain that in some tutorial on our website.
What about data types?
The project looks very interesting. What about facilities to create data types in a easier way.
Hi Byron,
Thank you for trying our framework. I'll paste a post from another thread that is hopefully answer to your question:
About custom data types - those are not directly supported by our framework in a way that you can create data types through Visual Studio and have them deployed automatically. You must create your data type directly through browser in Umbraco as you always did. However, you can declare document type property in your class to be of that newly created data type as following:
In this example you declared property 'MyProperty' which is of 'MyCustomDataType' data type. What I did in this example is tht I set property type to UmbracoPropertyType.Other and set OtherTypeName to name of that custom data type. Note that string value of MyProperty during runtime will contain actual value of this data type (usually xml).
Furthermore, instead of declaring property as string MyProperty you can declare it with your own .NET type (instead of string) if you build appropriate convertor (class that implements Vega.USiteBuilder.Types.ICustomTypeConvertor so that you don't hasle with xml every time when you use this property). But we'll explain that in some tutorial on our website.
Byron, umbraco 4.6+ has a much improved way to create custom datatypes. Check out Tim's blog post for a good example.
Hi Sebastiaan, I think the new approach is great. The only problem I had was when I tried to save CDATA in an xml value, as posted here.
is working on a reply...