Copied to clipboard

Flag this post as spam?

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


  • C Andreasson 79 posts 207 karma points
    Nov 05, 2013 @ 11:59
    C Andreasson
    0

    Media Picker two images

    Hello again

    Now I want two images replaced  this html.

    I can not figure out how to write the code?

    Has made ​​two media picker, one for a thumnails and one for large image.

    It should end up with: click thumnails and large picture appears in the background and thumnails should still be visible

  • Jeavon Leopold 3072 posts 13628 karma points MVP 10x admin c-trib
    Nov 05, 2013 @ 12:13
    Jeavon Leopold
    1

    Hi, how about something like:

    @{      
        if (CurrentPage.HasValue("image_1") && CurrentPage.HasValue("stort_img1"))
        {
            var largeImage = Umbraco.Media(CurrentPage.image_1);
            var thumbImage = Umbraco.Media(CurrentPage.stort_img1);
    
            <a href="@largeImage.umbracoFile"><img src="@thumbImage.umbracoFile" alt="@thumbImage.Name"/></a>
        }
    }
    
  • Jeavon Leopold 3072 posts 13628 karma points MVP 10x admin c-trib
    Nov 05, 2013 @ 12:14
    Jeavon Leopold
    0

    Also, have you considered automating the thumb creation instead of having it manually uploaded?

  • C Andreasson 79 posts 207 karma points
    Nov 05, 2013 @ 12:49
    C Andreasson
    0

    Thank you so much ;-)

     

    automating the thumb: No, I do not know how it works? do you have a suggestion

  • Jeavon Leopold 3072 posts 13628 karma points MVP 10x admin c-trib
    Nov 05, 2013 @ 13:58
    Jeavon Leopold
    0

    There are a few options for you. You could use the built in Image Cropper, however I would recommend the "Image Cropper Extended" package instead which is a improved version of the build in cropper.

    Alternatively you could use ImageGen or CropUp

  • C Andreasson 79 posts 207 karma points
    Nov 06, 2013 @ 17:17
    C Andreasson
    0

    Hi Jeavon thanks for guidance I will try ;-)

Please Sign in or register to post replies

Write your reply to:

Draft