Copied to clipboard

Flag this post as spam?

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


  • Claushingebjerg 939 posts 2574 karma points
    Dec 17, 2014 @ 15:17
    Claushingebjerg
    0

    Recursively getting cropped images for multi media picker

    Im trying to show cropped images from a multi media picker recursively.

    If none are define on currentpage go back on level and check, and so on. IM LOST!

    @if (CurrentPage.AncestorOrSelf(1).HasValue("billeder")) {
        

    @CurrentPage._billeder

    }

    Retunrs the media id's corectly. But from that to getting to showing the cropped images goes beyond my mental capacity...

    I have some code for doing it dynamically, but cant get how to make that recursive either...

    @if (Model.Content.HasValue("billeder")) {
    }

    Any help would be great :)

  • Claushingebjerg 939 posts 2574 karma points
    Dec 17, 2014 @ 16:03
    Claushingebjerg
    100

    Ahhh, after hours of googlin the magic of incomprehensible Razor strikes again... to do it recurcivle i just had to add ",true"

    @if (Model.Content.HasValue("billeder", true))
    { 
    }

    Lets leave it here as a reference for other non .NET coding frontenders like myself :)

Please Sign in or register to post replies

Write your reply to:

Draft