Copied to clipboard

Flag this post as spam?

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


  • Rozelle Elson 10 posts 100 karma points
    May 19, 2017 @ 14:38
    Rozelle Elson
    0

    LEBLENDER

    Hi

    I have installed LeBlender and have created some grid editors such as a carousel , by following the videos but when it displays on the page , I get the following error message , can you help with this ?

    The partial view '/views/partials/grid/editors/Carousel.cshtml' was not found or no view engine supports the searched locations. The following locations were searched: /views/partials/grid/editors/Carousel.cshtml

  • Alex Skrypnyk 6163 posts 24143 karma points MVP 8x admin c-trib
    May 19, 2017 @ 22:11
    Alex Skrypnyk
    100

    Hi Rozelle

    Please, create '/views/partials/grid/editors/Carousel.cshtml' file and use this code as example of rendering Carousel:

    @inherits UmbracoViewPage<Lecoati.LeBlender.Extension.Models.LeBlenderModel>
    
    @if (Model.Items.Any())
    {
      <!-- Wrapper for slides -->
        <ul>
            @{
            var item = Model.Items.ElementAt(0);
    
            var imageList = item.GetValue<string>("multiImageSlider");
            if (!string.IsNullOrWhiteSpace(imageList))
                    {
                        var imgList = imageList.Split(new[] { "," }, StringSplitOptions.RemoveEmptyEntries).Select(int.Parse);
    
                        var imgListCollection = Umbraco.TypedMedia(imgList);
    
                        if (imgListCollection != null)
                        {
                            foreach (var img in imgListCollection)
                            {
                                <li><img src="@img.Url"></li>
                            }
                        }
                    }
            }
        </ul>
    }
    

    Thanks,

    Alex

  • Brett Fullam 119 posts 629 karma points
    May 31, 2017 @ 15:37
    Brett Fullam
    0

    Hey Alex ... this code you included for rendering a Carousel is different from sample provided by LeBlender.

    I've tried working with it, but can't get it to work with LeBlender's current Grid Editor for Carousel ... what is this code looking for in the property type "multiImageSlider"? Just a multiple media picker? Any insight here would be helpful. The original carousel code works ... I'm just interested in understanding this other version.

    (By the way ... I finally got LeBlender working thanks to Tom Engan's help ... LeBlender only works with the "obsolete" media picker versions. Those are included in earlier installs of Umbraco, but not in the new ones (after 7.5.11 I think) ... they've all be deprecated and made unavailable. We managed to make them available again in v7.6.x to get LeBlender up and running again)

  • Mov3nforward 117 posts 319 karma points
    Apr 13, 2018 @ 19:04
    Mov3nforward
    1

    This is my code using Leblender and the new Multiple Media Picker. Hope it helps.

    @inherits UmbracoViewPage<Lecoati.LeBlender.Extension.Models.LeBlenderModel>
    @{
    var item = Model.Items.ElementAt(0);
    var imageList = item.GetValue<IEnumerable<IPublishedContent>>("images");
    
    string theme = umbraco.library.GetPreValueAsString(Convert.ToInt32(Model.Items.ElementAt(0).GetValue("Theme")));
    }
    <div class="row carousel-row">
    <div class="col-sm-10 col-sm-offset-1">
        <div id="owl-site-logos" class="owl-carousel owl-outer-nav owl-ui-md owl-item-gap @theme">
    
            @foreach (var image in @imageList)
            {
                <div class="item">
                    <figure>
                        <div class="icon-overlay icn-link">
                            <img class="img-rounded" src="@image.Url" alt="@image.Name" />
                        </div>
                    <figure>
                </div>
            }
    
        </div>
    </div>
    

Please Sign in or register to post replies

Write your reply to:

Draft