Upgrading to Umbraco v7.6? See here
Umbraco Package: http://our.umbraco.org/projects/developer-tools/umbraco-core-property-value-converters
Nuget Package: Install-Package Our.Umbraco.CoreValueConverters
MyGet Latest Build Package: https://www.myget.org/gallery/umbraco-core-property-value-converters
Once installed you cannot access the original raw value of the property by using Model.Content.GetPropertyValue("propertyAlias")
however you can access it by using Model.Content.GetProperty("propertyAlias").DataValue.ToString()
The v3 package for Umbraco v7.4+ currently implements converters for the following built-in Umbraco property editors:
IPublishedContent
IPublishedContent
IEnumerable<IPublishedContent> or IPublishedContent
IEnumerable<IPublishedContent>
RelatedLinks
These converters work with both the typed IPublishedContent (Model.Content) and also the dynamic DynamicPublishedContent (CurrentPage). We use some dark magic (StackTrace) to make sure we return the correct model. However if you only use one model you can specify this by adding a optional key to app settings of your web.config, this will avoid the dark magic and therefore improve performance. The optional setting is as follows:
<add key="Our.Umbraco.CoreValueConverters:Mode" value="typed" />
<add key="Our.Umbraco.CoreValueConverters:Mode" value="dynamic" />
v3 works brilliantly with the Umbraco ModelsBuilder that is included with Umbraco v7.4+. More information on this can be found here
If you're upgrading a website using this package to Umbraco v7.6 it is recommend that you un-install this package before you upgrade, this is because the package has been included in Umbraco v7.6 Core. Additionally it should be noted that this package does not currently convert the "v2" pickers such as "Umbraco.ContentPicker2" so any new pickers will not be converted to objects unless EnablePropertyValueConverters
is enabled.
Steps are:
CoreValueConverters
NuGet PackageEnablePropertyValueConverters
setting in the Content
element of umbracoSettings.config
RelatedLinks
model it has changed namespace to Umbraco.Web.Models
so you may need to update the namespace in the /Views/Web.config
and any other code that has referenced RelatedLinks
This project is MIT licensed