Copied to clipboard

Flag this post as spam?

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


  • Arindam 11 posts 91 karma points
    May 12, 2017 @ 08:29
    Arindam
    0

    Need Carousel in Header

    enter image description here

  • David Houghton 33 posts 108 karma points
    May 12, 2017 @ 08:46
    David Houghton
    0

    Add a picker on the homepage node for selecting the images you want in the carousel.

    On the homepage view put

    var pickerAlias = "yourPickerAliasHere";
    var hasCarouselImages = Model.Content.HasProperty(pickerAlias)  && Model.Content.HasValue(pickerAlias); 
    

    This evaluates to true / false.

    Now use like:

    @if(hasCarouselImages){
                 @Html.Partial("shared/_header-carousel");
     }
    

    In the partial build up your carousel. Just make sure that when you loop over the added images, do a test to see if the image does not equal null.

    There are so many carousels out there continuing from this point will be a touch difficult but a carousel I very much like because of its ease of implementation, responsiveness and available settings is slick carousel - http://kenwheeler.github.io/slick/ give it a shot and if you need any help setting up id be happy to help you out.

  • Arindam 11 posts 91 karma points
    May 12, 2017 @ 14:41
    Arindam
    0

    Hi David ,thanks for your valuable time . I will be revert back once applied the same.

Please Sign in or register to post replies

Write your reply to:

Draft