Copied to clipboard

Flag this post as spam?

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


  • Craig100 1136 posts 2523 karma points c-trib
    Apr 11, 2013 @ 21:00
    Craig100
    0

    CropUp problem

    Hi,

    Installed current version of CropUp in a V6.0.3 test site.  Appears to be working but in my Razor macro I must be missing a "using" statement as "CropUpModule" appears to be unknown.

    @inherits umbraco.MacroEngines.DynamicNodeContext
    @{
    var theSliderImage = Model.Media("sliderImage");
    var cropPath = CropUpModule.GetImageUrl(theSliderImage.umbracoFile,new
    ImageSizeArguments{Width=960,Height=377});
    <p>Slider Image</p>
    <img src="@cropPath" alt="@theSliderImage.Name">
    }

    What should I be referencing for CropUp to work?

    Craig

  • Craig100 1136 posts 2523 karma points c-trib
    Apr 11, 2013 @ 21:09
    Craig100
    0

    Turns out the online examples are out of date. If anyone's interested I have it working like this:-

     

    @inherits umbraco.MacroEngines.DynamicNodeContext
    @using Eksponent.CropUp
    @{
            var theSliderImage =Model.Media("sliderImage");
            var cropPath =CropUp.GetUrl(theSliderImage.umbracoFile,new
    ImageSizeArguments{Width=960,Height=377});              
            <p>SliderImage</p>
            <img src="@cropPath" alt="@theSliderImage.Name">
    }

    Craig

     

Please Sign in or register to post replies

Write your reply to:

Draft