+}
+```
+
+If you are using Umbraco's ModelsBuilder feature, then the underlying object-type will automatically be wired up for you. You don't need to worry about this part.
+
+---
+
+### Useful Links
+
+* [Source Code](https://github.com/umco/umbraco-property-list)
+* [Our Umbraco Project Page](http://our.umbraco.org/projects/backoffice-extensions/property-list)
diff --git a/docs/img/screenshots/property-list-data-prevalues.png b/docs/img/screenshots/property-list-data-prevalues.png
new file mode 100644
index 0000000..6de55c9
Binary files /dev/null and b/docs/img/screenshots/property-list-data-prevalues.png differ
diff --git a/docs/img/screenshots/property-list-property-editor-01.png b/docs/img/screenshots/property-list-property-editor-01.png
new file mode 100644
index 0000000..cc49a5b
Binary files /dev/null and b/docs/img/screenshots/property-list-property-editor-01.png differ
diff --git a/docs/img/screenshots/property-list-property-editor-02.png b/docs/img/screenshots/property-list-property-editor-02.png
new file mode 100644
index 0000000..4ede366
Binary files /dev/null and b/docs/img/screenshots/property-list-property-editor-02.png differ
diff --git a/src/Our.Umbraco.PropertyList/ValueConverters/PropertyListValueConverter.cs b/src/Our.Umbraco.PropertyList/ValueConverters/PropertyListValueConverter.cs
index 9a4895f..d1dbdf8 100644
--- a/src/Our.Umbraco.PropertyList/ValueConverters/PropertyListValueConverter.cs
+++ b/src/Our.Umbraco.PropertyList/ValueConverters/PropertyListValueConverter.cs
@@ -19,14 +19,16 @@ public class PropertyListValueConverter : PropertyValueConverterBase, IPropertyV
{
public override bool IsConverter(PublishedPropertyType propertyType)
{
- return propertyType.PropertyEditorAlias.Equals(PropertyEditorKeys.Alias);
+ return propertyType.PropertyEditorAlias.InvariantEquals(PropertyEditorKeys.Alias);
}
public override object ConvertDataToSource(PublishedPropertyType propertyType, object source, bool preview)
{
var data = source?.ToString();
if (string.IsNullOrWhiteSpace(data))
+ {
return null;
+ }
var innerPropertyType = this.GetInnerPublishedPropertyType(propertyType);
@@ -41,14 +43,18 @@ public override object ConvertDataToSource(PublishedPropertyType propertyType, o
{
var model = JsonConvert.DeserializeObject(data);
if (model != null)
+ {
items.AddRange(model.Values);
+ }
}
else
{
// otherwise we assume it's XML
var elements = XElement.Parse(data);
if (elements != null && elements.HasElements)
+ {
items.AddRange(elements.XPathSelectElements("value").Select(x => x.Value));
+ }
}
var values = new List