Home > Default > Sharepoint 2013 custom search results grouping display template

Sharepoint 2013 custom search results grouping display template

October 11Hits:19
Advertisement
Hi,
I am trying to implement custom grouping for search result items. I would like to group them by a managed property, but without using result blocks (query rules). The idea is to sort the results by the property and then compare the current item (ctx.CurrentItem)
with the previous item using ctx.CurrentItem.ParentTableReference. If a new property value is detected we insert a new 'group header' (just some simple html). The problem is the ParentTableReference is undefined. Shouldn't there be such a property in current
item object?
I'm implementing this in a custom search result item display template...
Thanks in advance.

Answers

Hi,
According to your post, my understanding is that you want to customize search result items display template.
I suggest you get enumerate all properties of JavaScript context object and debug you code to watch the
ctx.CurrentItem object.
The following articles for your reference:
Debugging Display Templates in SharePoint 2013 Search
http://powersearching.wordpress.com/2013/01/25/debugging-display-temlates-in-sharepoint-2013-search/
Enumerate all properties of JavaScript context object in display templates in SharePoint 2013
http://sadomovalex.blogspot.co.uk/2013/06/enumerate-all-properties-of-javascript.html
How to Define a Custom Group Display Template (GroupTemplateId) for the Search Results WebPart via JavaScript
http://www.eliostruyf.com/how-to-define-a-custom-group-display-template-for-the-search-results-webpart-via-javascript/
Creating customized search results in SharePoint 2013
http://www.abelsolutions.com/totm/creating-customized-search-results-in-sharepoint-2013/
Best Regards
Dennis Guo
TechNet Community Support

Read other 4 answers

Tags:

Related Articles

  • Sharepoint 2013 custom search results grouping display templateOctober 11

    Hi, I am trying to implement custom grouping for search result items. I would like to group them by a managed property, but without using result blocks (query rules). The idea is to sort the results by the property and then compare the current item (

  • SharePoint 2013 custom search Result Type for "Documents" not showing up as optionOctober 11

    I'm trying to create a custom search Result Type called "Documents" that will filter to MS Office filetypes and PDF's. However, when I perform a search, although many of these types of files show up in the results, I don't have "Documents&q

  • Sharepoint 2013 bing search resultsOctober 11

    I have integrated bing search to my sharepoint 2013. Its returning results but i am facing two issues. 1) The bing search is always returning only 8 results 2) I want to get results for only particular website and i have used following query. But its

  • Image Preview in Sharepoint 2013 Online Search ResultsOctober 11

    Hi i am using Sharepoint 2013  online Office 365. In my search page i can view the preview from picture library. But when i am searching document library i can only see the preview of pdf, excel, word etc... not image. Why image file not previewing f

  • Creating customized search results in SharePoint 2013October 11

    I am trying to customize search result through display template. my template has two block for Rendering. how to customize search result such as following image:Hi Dastani, There are two ways to display your results. In Search result web part by crea

  • Display an XML file Content as a treeView in a SharePoint 2013 custom form edited with SharePoint Designer 2013November 30

    Hello everyone, Within a list form, user has to select a value amongst a huge number of availables options. Instead of using something like a dropdown list, which would be very boring to parse, I would like to display possibles values in a treeview.

  • How to set a customized search results template for all usersNovember 30

    Hi. I know the customized search results views are stored in a file called pne_portal.hda that resides on every user's subfolder in data/users/profiles/... Is there a way to set a customized search results template for all users? If it's impossible,

  • Group display templatesNovember 30

    Hi all I am implementing a search-driven carousel in SharePoint Online 2013 Preview like this one: http://www.blendmaster.net/blog/2012/11/search-driven-twitter-bootstrap-carousel-in-sharepoint-2013/. Unlike that one, I am implementing it using the S

  • Configure search results to display only this siteOctober 11

    HI when i search anything in my publishing site the search results display from all sites in sharepoint farm. how i configure search results to display only this site: i found there is no option in sitesettings>searcscopes  and i created a custom sea

  • Adding Custom Breadcrumb for SharePoint 2013 Custom Master-Page With A Custom Separator.October 11

    Hi All, I have successfully converted an HTML file to a SharePoint 2013 Custom Master-Page with relevant style sheets. But when I used within the SharePoint site I could not find the breadcrumb. So I want to know how to do that? For that breadcrumb I

Copyright (C) 2019 wisumpire.com, All Rights Reserved. webmaster#wisumpire.com 14 q. 1.154 s.