Copied to clipboard

Flag this post as spam?

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


  • James 251 posts 1169 karma points
    Nov 17, 2014 @ 11:22
    James
    0

    Checking if a property is empty

    Hi Everyone,

     

    I was hoping this would be fairly simple, but it seems that is is not, for me at least  :).

     

    I have a page called Event. One of the properties is a multi-media picker called "Event People". (Alias = "eventPeople").

     

    How can I check to see if the user has populated this property?

     

    @if(Model.Event.IsNull("eventPeople")){}else{}

     

    Kind regards,

     

    J

     

  • Dennis Aaen 4457 posts 17970 karma points admin hq c-trib
    Nov 17, 2014 @ 11:28
    Dennis Aaen
    0

    Hi James,

    Have you have a look on the documentation for the Media Picker for Umbraco 7. There is a dynamic razor version and a strongly typed, take a look here: http://our.umbraco.org/documentation/using-umbraco/backoffice-overview/property-editors/Built-in-Property-Editors-v7/Media-Picker

    Hope this helps,

    /Dennis

  • James 251 posts 1169 karma points
    Nov 17, 2014 @ 11:36
    James
    0

    Hi Dennis,

     

    Its an earlier Umbraco version using DAMP Multi-media picker

     

    Any ideas?

     

    Cheers.

  • Dennis Aaen 4457 posts 17970 karma points admin hq c-trib
    Nov 17, 2014 @ 11:47
    Dennis Aaen
    100

    Hi James,

    Okay have you tried this maybe it will works.

    @if(Model.HasValue("eventPeople")){
    }
    else{
    }

    Or maybe see this video can help you, http://www.screenr.com/qvj8

    If not then you could try to ask in the DAMP space of Our. http://our.umbraco.org/projects/backoffice-extensions/digibiz-advanced-media-picker

    Maybe you also could have a look on DAMP Property Editor Value Converter http://our.umbraco.org/projects/backoffice-extensions/damp-property-editor-value-converter there is a method called Any. Any - Returns a boolean to see if any items are selected.

    Hope this helps,

    /Dennis

  • James 251 posts 1169 karma points
    Nov 17, 2014 @ 12:16
    James
    0

    Cheers Dennis!

  • 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