Copied to clipboard

Flag this post as spam?

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


  • Phillip Ng 148 posts 250 karma points
    Oct 22, 2014 @ 02:24
    Phillip Ng
    0

    Trouble iterating through data

    Hi

    Awesome data type and thanks for the code snippet to iterate through the results! I am having some difficulty with testing for first item in the property e.g.

     

        @foreach( var item in CurrentPage.news )
    
      {
                if( item.First ) {...}
    else ()
    }


    doesn't seem to work. No luck with First(), or even dog[0]. I am trying to alter the html for the first returned item. The error is, "Cannot convert null to 'bool' because it is a non-nullable value type." Thanks in advance!

  • Phillip Ng 148 posts 250 karma points
    Oct 22, 2014 @ 22:55
    Phillip Ng
    0

    Also, if I allow for multiple Media Picker items, how do I access each individually?

  • gilad 185 posts 425 karma points
    Dec 02, 2014 @ 01:43
    gilad
    100

    Hi Phillip.
    Code snippet are update and now include snippit for multiple Media Picker and multiple Content Picker.

    Cheers.

  • Phillip Ng 148 posts 250 karma points
    Dec 04, 2014 @ 19:45
    Phillip Ng
    0

    Awesome. Thank you!

Please Sign in or register to post replies

Write your reply to:

Draft