Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hey guys!
I have a small problem with ternary condition I want to do:
@foreach(var elem in @Model._imagesRelatios)
{
var node = @Model.NodeById(elem.InnerText);
var des = (@node.description.ToString() != "") ? @node.description.ToString() : "";
}
The "description" is provided under "media", and are grouped by a "Multi Node Tree Picker!.
The problem is that when the field "description" is empty, so it returns is this.
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
umbraco.MacroEngines.DynamicXml. Problems with empty field.
Hey guys!
I have a small problem with ternary condition I want to do:
@foreach(var elem in @Model._imagesRelatios)
{
var node = @Model.NodeById(elem.InnerText);
var des = (@node.description.ToString() != "") ? @node.description.ToString() : "";
}
The "description" is provided under "media", and are grouped by a "Multi Node Tree Picker!.
The problem is that when the field "description" is empty, so it returns is this.
umbraco.MacroEngines.DynamicXml
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.