Copied to clipboard

Flag this post as spam?

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


  • Tobias Morf 80 posts 183 karma points
    Feb 27, 2013 @ 16:37
    Tobias Morf
    0

    Some Generic Properties not accessible for Media items

    In Umbraco 4.11.4 some Generic Properties for Media items are not accessible before you have accessed it at least once.

    var imageNew = Model.MediaById(1234);
    var tempAccess = imageNew.ImageCropper;
    // the Property has to be called at least once // now it is possible to access it via HasProperty or HasValue if (imageNew.HasProperty("imageCropper") && imageNew.HasValue("imageCropper")) {
    <img src="@imageNew.ImageCropper.crops.Find("@name","NewsPreview").url" width="86" height="86" title="@captionImage" alt="@captionImage" />
    }

    Is there a solution for this?

  • 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