Copied to clipboard

Flag this post as spam?

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


  • Keith R Hubbard 175 posts 403 karma points
    Apr 21, 2016 @ 02:45
    Keith R Hubbard
    0

    getting cropped images after UrlHelper Extention was introduced

    I have upgraded a site or two to 7.4.2 and 7.4.3

    now crops are not working pulling from a mediafolder using my partial.

    @{
    
    var galleryFolder = Umbraco.TypedMedia(Model.Content.GetPropertyValue<int>("galleryFolder"));   
    
    // Get all child items based on the 'CWS_Gallery' and group them is 4
    
    if (galleryFolder != null){
    
    <!-- Content -->
    
    <div class="row">
    
        @foreach (var group in galleryFolder.Children.InGroupsOf(4))
        {
            foreach (var item in group)
            {
                // find you whether is the first item of the group and set the css class
                var itemClass = item.IsFirst("first item left", "item left");
    
                // tell images and links where to find sources of datatypes
                var src = item.GetCropUrl("cropper", "thumbNail");
                var photosrc = item.GetCropUrl("cropper", "photo");
    
    
    
        <div class="col-lg-3 col-md-3 col-sm-3">
            <div class="@itemClass">
                <a class="fancybox" href="@photosrc" data-fancybox-group="gallery"><img src="@src" alt="@item.Name" />@item.Name</a>
                <span>@item.GetPropertyValue("PhotoText")</span>
            </div>
        </div>
    
        }
        }
    
    </div>
    <!-- /Content -->       
    }
    
    
    }
    

    I see the updated documentation but nothing seems to work.

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Apr 21, 2016 @ 05:05
    Jan Skovgaard
    1

    Hi Keith

    Do you get any kind of error message or does the images just not render all of the sudden?

    Have you checked the /config/logs file to see if it reveals more details that could be related...anything marked with "ERROR" that might give a clue? And have you checked the browsers console log to see if that provides anything of use? - I doubt that the console log will give any hints in this situation but worth checking for good measure imho :)

    /Jan

Please Sign in or register to post replies

Write your reply to:

Draft