A few more stops on Display Templates and Search Webparts

Hello SharePointer 🙂

Till now we have seen the quick facts for display template in my previous blog post.Here, I am going to explain further more points to look over before we actually implement the requirements.

Few more stops

Very first requirement in order to have content on web part is running mode of Search Service and the next is enabled publishing feature in site.In SharePoint Online, Search service will be taken care by Microsoft 🙂 and you are good to go to work with Search Web parts for On Premises or Online SharePoint Site.

Alright, at this point we will have look on content what we can display as per the need. Actually ,there are two types of web part we can use to leverage the search:

  1. Content Search Web part: Specifically meant to display your content/products in designed view using dedicated display templates.
  2. Search Results Web part: Specifically meant to modify the view of search results via display templates.

Actually, the content we use from search considered as results types whether its collection of page/post/site/email/Image etc. which are associated with specific display templates as explained in Microsoft article.

Both the web parts concentrated with more similar functionality, however the purpose of using them is a bit different. I have also mentioned the different types of settings availability in both the web parts as demonstrated in following table:

search webpart difference

The best part of these web parts is that it gives you the facility to build up the custom query via query variables to filter the items from selected result types.For more information about query variables to be entered in Keyword filter and Property Filter, please have a look on this Microsoft article.

AND -> Last but not least, Search Web parts are security trimmed by default and you don’t require to control user’s security setting explicitly 🙂 , I am loving it !!

Note: We can also use the content query web part to display the content however it will display the results only from the current site collection while Search web parts are leveraging the cross-site publishing feature and that’s much faster than content query web part.CQWP results are rendered by XSLT ( XML file ) while CSWP results are rendered display Templates ( HTML file ).Please have a look on this article that explains understanding about deciding CSWP or CQWP.

Next we will look over on customization of Search web parts .

Happy SharePointing,

Stay Gifted,Stay Young !

Dipti Chhatrapati

Dipti Chhatrapati is a passionate and ambitious SharePoint & Office 365 specialist, including technologies that are or will be directly interacting with SharePoint technology stack. She currently holds a position of manager as SharePoint/Office 365 Architect in Capgemini, Mumbai.

Leave a Reply

1 Comment threads
0 Thread replies
Most reacted comment
Hottest comment thread
1 Comment authors
SharePoint Online Training Recent comment authors
newest oldest most voted
Notify of
SharePoint Online Training

Nice, looking forward to seeing these new posts especially with the scenario you’re building for SharePoint blogs!

Animated Social Media Icons by Acurax Wordpress Development Company
Visit Us On TwitterVisit Us On FacebookVisit Us On LinkedinVisit Us On Instagram