Copied to clipboard

Flag this post as spam?

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

  • David Hammer 41 posts 67 karma points
    Apr 11, 2014 @ 14:16
    David Hammer

    Get Damp Image in razor

    Hey guys,

    I just now installed the Digibiz Advanced Media Picker, because I thought it looked awesome and wanted to be able to crop the images on the spot and put them in my slider. But now, when I reupload images through this tool, the images wont show.

    This is the typical way I showed the media before:

    var sliderItems = Model.AncestorOrSelf(1).DescendantsOrSelf("FrontpageSliderItems").First();
    @foreach (var item in sliderItems.Children.OrderBy("Id desc"))
        @if (item.HasValue("frontpageSliderItemImage"))
            <img src="@item.Media("frontpageSliderItemImage","Image")" />

    This worked before, and showed the images when chosen in a regular media picker. Now how to I replace this code to show the images selected with the DAMP Media Picker?

    Sorry if it's a replica, couldn't find anything that had a simple enough answer for me to understand it :/

Please Sign in or register to post replies

Write your reply to: