Copied to clipboard

Flag this post as spam?

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


  • John Churchley 272 posts 1258 karma points c-trib
    May 06, 2014 @ 20:26
    John Churchley
    0

    GetCropUrl overload fallback

    Can anyone let me know an easy way to create a fallback for GetCropUrl.

    I'm looking for equivalent for media file as GetPropertyValue(string alias, string defaultValue) is for content?

  • Jeavon Leopold 3074 posts 13631 karma points MVP 11x admin c-trib
    May 06, 2014 @ 20:29
    Jeavon Leopold
    100

    Hi John,

    What would the criteria be, a completely empty cropper (no image at all) or something else? Also what would you display, maybe a http://placehold.it/ or something else?

    Jeavon

  • Matthieu Nelmes 102 posts 385 karma points
    Aug 19, 2015 @ 16:02
    Matthieu Nelmes
    0

    Sorry to jump on an old thread but I think I am also looking for the same solution.

    I'm seeing some weird behavior where GetCropUrl("propertyAlis", "cropAlias") is returning a malformed URL string if it doesn't match a cropAlias due to no image being uploaded.

    I would expect it return null or it would be nice to specify a default/fallback.

    I haven't had chance to dig around the Umbraco src but if I find anything I will update everyone here

Please Sign in or register to post replies

Write your reply to:

Draft