I have a Nupicker checkbox list of nodes you can select. After installing Nexu I was testing if I get a message when I delete a selected node from the content tree. Unfortunately I didn’t got a message, probably because nuPciker isn’t in the supported property editors list.
Should it already work with nuPicker or is this perhaps a future request?
I did not support nuPickers. This is because the data in nuPickers isn't necesarry Umbraco Content. You can connect to all types of data sources with nuPickers.
Here you have some example code of a parser for a nuPickers datatype that stores the valuas as CSV. After you added this to your project you need to register it with Nexu. You can find that in the docs.
public class CategoryPickerSinglePropertyParser : IPropertyParser
{
public bool IsParserFor(IDataTypeDefinition dataTypeDefinition)
{
// check on the name of your nupickers type
return dataTypeDefinition.Name.Equals("Category picker single");
}
public IEnumerable<ILinkedEntity> GetLinkedEntities(object propertyValue)
{
if (propertyValue == null || string.IsNullOrEmpty(propertyValue.ToString()))
{
return Enumerable.Empty<ILinkedEntity>();
}
var entities = new List<ILinkedEntity>();
var idArray = propertyValue.ToString().Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
foreach (var id in idArray)
{
var attemptId = id.TryConvertTo<int>();
if (attemptId.Success)
{
entities.Add(new LinkedDocumentEntity(attemptId.Result));
}
}
return entities;
}
}
Nexu with nuPicker (checkbox)
Hi,
I have a Nupicker checkbox list of nodes you can select. After installing Nexu I was testing if I get a message when I delete a selected node from the content tree. Unfortunately I didn’t got a message, probably because nuPciker isn’t in the supported property editors list.
Should it already work with nuPicker or is this perhaps a future request?
Hi Robbie,
I did not support nuPickers. This is because the data in nuPickers isn't necesarry Umbraco Content. You can connect to all types of data sources with nuPickers.
But I made nexu extensible so you can add your own parsers : https://github.com/dawoe/umbraco-nexu/blob/develop/docs/extending.md
Here you have some example code of a parser for a nuPickers datatype that stores the valuas as CSV. After you added this to your project you need to register it with Nexu. You can find that in the docs.
Dave
Hi Robbie,
Did you try my suggestion ? Did it work for you ?
Dave
Hi Dave,
Yes, I gave it a try, but was stuck at registering the custom parser. Now with a fresh start (and restart of VS) it works. Thanks a lot!
Great package and fast support :-)
Hi Robbie,
Glad to hear you got it working. Maybe you can mark this post as a solution so it others can see it is solved.
Dave
is working on a reply...