SharePoint 2013 Image Carousel (Rotating Banner) using Content Search Web Part

SharePoint 2013 brought an excellent web part to get content from the search index, called “Content search web part”. Using the content search web part, We can build a simple image rotator or the content slider in a few steps.

Content Search Web part is available only on SharePoint 2013 enterprise edition!

Step 1 –  Create a Picture Library and upload images:
Go to your SharePoint site >> Create a new picture library.

SharePoint 2013 Image Carousel using Content Search Web Part

Give it a Name, Say “Slides.”

Upload required banner images to the library

Rotating Banner using Content Search Web Part

Step 2: Trigger Incremental Crawl:
Trigger an incremental crawl or wait for the incremental crawl schedule to complete, So that the picture library we created is added to the search index.

Step 3: Add Content Search Web Part to the page
Navigate to the page where you would like to add a content slider. Click on Site settings gear >> Edit page >> On Insert tab, Click on Web part >> Under the Content Rollup, select “Content Search” and then click on “Add” button.

SharePoint 2013 how to add content search web part

Now, the web part should look like the below image. Click on “Edit Web Part” from the web part menu,

content search web part sharepoint 2013

Click on the “Change Query” button from the web part properties pane.

sharepoint 2013 slider

Select a query as: Pictures (system) and Restrict by app as : Specify a URL. In the URL field, enter the URL of your picture library and Click on OK.

sharepoint 2013 slider web part

In Edit Properties, Set the Number of items to show as per your requirement, and expand the Display templates section. Set the Control template as “Slideshow” and Item template as “Large picture”.

sharepoint 2013 content search web part display templates

That’s all! Done. This is what we get on the page!

sharepoint 2013 carousel

Well, what we’ve done above is just a slideshow. On clicking banner images, they take us to the individual image from the banner. However, We may have to link banners to different URLs. Say, on clicking the above “New markets” banner, and you may want to send users to https://your-sites/departments/new-markets/, isn’t it? So, what this step brings, in addition, is: When the user clicks on the banner, where it should take them, Lets head on to the next step:

SharePoint 2013 generates managed properties for site columns. If you add a column directly to a list, it will not generate a managed property automatically!

Step 1: Add a new Site column and Include it in the library
We need a column to hold the target URL (when the banner is clicked!), So let’s create a new site column and add it to the Slides picture library. The reason we create a site column, rather than adding a column to the list directly, is: We need a managed property! Fortunately, in SharePoint 2013, all site columns will be automatically created as managed properties!

Navigate to “site action >> Site settings >> Site columns >> Create new site column “TargetURL”
 content search web part sharepoint 2013 tutorial
Add a site column to the Library:
Go to list settings >> Add from existing site column >> and choose the site column “TargetURL”.

Once done, update the TargetURL value for all banner images. sharepoint 2013 content slider
Once done, initiate either incremental/full crawl – This will create a new crawled property as well as managed property for the custom site column we’ve added to the picture library.

Verify the managed property:

Go to : Site settings >> search schema >> Managed properties. Make sure you get the managed property listed.

sharepoint 2013 content search webpart slideshow

Now, configure the managed property in the content search web part properties. Go to the Edit page, Modify the web part, And set the “Link URL” value to the managed property created from our custom column (TargetURL).

sharepoint 2013 content search web part picture url

That’s all! Now the banner images will be pointing to the URLs specified in the TargetURL column!

Salaudeen Rajack

Salaudeen Rajack - Information Technology Expert with Two-decades of hands-on experience, specializing in SharePoint, PowerShell, Microsoft 365, and related products. He has held various positions including SharePoint Architect, Administrator, Developer and consultant, has helped many organizations to implement and optimize SharePoint solutions. Known for his deep technical expertise, He's passionate about sharing the knowledge and insights to help others, through the real-world articles!

33 thoughts on “SharePoint 2013 Image Carousel (Rotating Banner) using Content Search Web Part

  • I need help to how to sort the images

    Reply
  • I want to have a simple Workflow to manage customer complaints: it’s simple form that must undergo a Workflow
    can u help me pls ???

    Reply
  • When I click on the image I’m also directed to “Site Pages”. Everything else works fine but this. Any suggestions would be appreciated.

    Reply
  • Hello I got exactly the same issue…How did you solve it?

    Reply
  • Please ignore my previous request for links. Its working now. My bad.

    Reply
  • Links not working, on clicking it takes me to site pages library. Gone through all steps, no hiccups. Any suggestions?

    Reply
  • Hi,
    Very very helpful ! 🙂
    can you tell me how to display more than one image at startup?
    Regards,
    ZP

    Reply
  • Sorry, all of my pictures don’t appear, I only get a grey background with a “?”

    Reply
  • Can you modify the interval time between slides? I’d like the slide images to change once a week.

    Reply
  • Hi,

    Done everything as per the steps to start my banner. Search query is also resulting in some images as per the URL I am specifying. Re-indexing has also been done. Still images are not appearing in the webpart.

    Reply
  • Great Article It works perfectly fine for me

    Reply
  • I am not sure why I am not able to see anything after setting up the query. I have re-indexed the library. While changing query i see pictures names and path under query result but noting showing up.

    Do i need to enable any site feature before getting it configured?

    Reply
    • Run Search crawl (Indexing) once! Because, content search gets the data from Search index!

      Reply
  • If you are not getting the TargetURL under the Link URL, try typing “TargetURLOWSTEXT” in the Link URL manually. It works for me this way. Hope this helps.

    Reply
  • I have been working on this solution for about two months based on this blog and created the identical scenario. The managed property is still not populating under the “Link URL” when I edit the Content Search Web Part. All aspects o this appear to be set correctly, including reindexing the picture library, full crawl, incremental crawl, ensuring that managed properties have been mapped.

    I can’t not seem to figure out what is wrong. It is an amazing tool and I would love to use this. Any help would be so very much appreciated.

    Reply
  • Hai first of all thank you for this nice post,here How can we increase the picture size??

    Reply
    • I would also like to know the answer to this, because currently the images are to small especially the width.

      Reply
    • I am having the same problem. Its not a banner as the Content Search Webpart is left aligned and I can not get it to center and the image is not scretched across the page even tho the image is 1500px x 300px. Anyone figured it out yet? it would really help me

      Reply
  • navigation not working its opening picture library

    Reply
  • i need couple of changes.
    first when click on image it should open url in new window
    2nd thing navigation not moving back and forth its opening the picture library,

    Reply
  • Hi
    in this i need some changes.
    when click on image it open the new url in new window.
    other thing when you click navigation button below right its going to picture library.
    i want this should go to next and previous image.

    Reply
  • Sometimes the Managed property will not get made so just make it and map the crawled property, also try removing gaps if you have any in the name i.e Target link will be Targetlink… Hope that helps.

    Reply
  • Works like a charm, thanks for the blog…

    Reply
  • Hi , Nice Article, simple and great functionality from out of box feature.

    I am not getting TargetURL(TargetURLOWSTEXT) under the “Link” drop down in webpart though I see the TargetURL(TargetURLOWSTEXT) field in crawling /Manager property,
    any idea
    Thank you in advance

    Reply
  • I waited for 1 week but still I am not seeing Target URL under Link URL in the Webpart configuration though the site was crawled ,I can See targetURLOWSTEXT under Managed Property,
    Thank you in advance and any help would be greatly appreciate.

    Reply
  • Great Post.. Thank you!!!

    Reply
  • ¿How can I make the number of pictures to display dynamic? I want to display all the available pictures…

    By the way a very big THANK YOU!!

    Reply
  • Great guide and it works perfectly!
    Like L Cook mentioned, is there anyway to remove the gray bar that displays the name/title of the picture?
    Also, the webpart is shrinking our pictures down. Manually setting the height and width of the webpart leave the pictures the same, smaller, size and just makes scroll bars with blank space. Any thoughts on this?

    Reply
    • Hi Alex,
      Did you get this to work?

      Reply
  • This is great!

    although it shows a shaded area at the bottom of the picture…how do you get rid of that?

    Reply
  • what is the frequqncy fo crawl in sharepoint online E3, will it display immidetly!

    -PrashanthSparks

    Reply
    • As per Microsoft KB: https://support.microsoft.com/kb/2008449, Its targeted between 15 Minutes to 1 Hour! In Heavy usage environments, It can take up to 6 Hours!

      Reply
  • Just created this week before and took one step further. Customized display control templates and item template. Looks fab. so happy with it 🙂

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *