I have a checklist datatype with a number of options. I have added a property to my doc type with this data type. On several content nodes of this doc type I have selected multiple options for that property, however, in those instances (when more than 1 option is chosen) I get back a null value and node.HasValue("myProperty") returns false.
Selected checklist options not returning
I have a checklist datatype with a number of options. I have added a property to my doc type with this data type. On several content nodes of this doc type I have selected multiple options for that property, however, in those instances (when more than 1 option is chosen) I get back a null value and node.HasValue("myProperty") returns false.
Any ideas what I am doing wrong?
Hi Michael
Would you mind sharing the code you're currently working on?
It will make it easier to figure out the solution :)
/Jan
@inherits umbraco.MacroEngines.DynamicNodeContext
@using umbraco.MacroEngines
@using System.Xml.XPath
@{
var items = Model.Children.Where("Visible");
}
<ul id="portfolio">
@for (int i = 0; i < items.Count(); i++){
var item = items[i];
if (item.HasValue("solutions")) {
string[] solutions = item.Solutions.Split(',');
@Html.Raw(item.Solutions)
} else {
@Html.Raw("No results")
}
}
</ul>
is working on a reply...