Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • umbracocool 108 posts 197 karma points
    Mar 26, 2013 @ 04:21
    umbracocool
    0

    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

     

     

  • 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.

Please Sign in or register to post replies