Questions tagged [display-template]

Display templates in SharePoint Server 2013 are templates used in Web Parts that use search technology to show the results of a query made to the search index. Display templates control which managed properties are shown in the search results, and how they appear in the Web Part. Each display template is made of two files: an HTML version of the display template that you can edit in your HTML editor, and a .js file that SharePoint uses.

Filter by
Sorted by
Tagged with
0
votes
0answers
12 views

display template not chaged until after refersh using ResultScriptWebPart

I'm implementing search center in server side(c#) with ResultScriptWebPart class in sp2013 farm. it a dynamic page with control template and item template that are changing on the fly depending on the ...
0
votes
1answer
26 views

How to customise the Control_SearchResults.html to change the href link

I would like to change the url link/path that is returned in search results based on the list name. I have downloaded a copy of the Control_SearchResults and the item_Default templates i just don't ...
0
votes
3answers
34 views

Manage Properties Issue SharePoint 2013

I am not able to get default SharePoint column in search display template. I have mapping to default column crawl property with custom manage property. How can i resolve this column in search result?
0
votes
1answer
23 views

How to use Display Template(Search result) to change the dispform.aspx and editform.aspx to a custom one?

I have setup a result source and currently when i do a search it returns some pages with allitem.aspx,disform.aspx and editform.aspx but i want to do the following:- - Remove the allitems.aspx for ...
0
votes
1answer
41 views

Cannot seem to access Calculated column in Display Template via Managed Property mapping

Here is my situation: I have a test/development site on SharePoint Online/Office 365 called TestSite3, and within that site a sub-site called TestBlog3 (a Blog site for making Posts). I want to use ...
0
votes
0answers
10 views

Query suggestions not working

We are using our custom display template with results script web part We are unable to get type ahead working I have tried below Set client type to: ContentSearchRegular Set client type to: ...
0
votes
1answer
23 views

Search result for images in a document library aren't working

We have a document library that includes some images -- as well as more traditional docx, pdf, xlsx, etc. In the search results that include the images they are being displayed using the Item_Default ...
0
votes
0answers
15 views

Getting List of Choice Field Values in Display Template

I have an Override Display Template where a (multiple) Choice field column is displayed as checkboxes, checked/unchecked if a value is present. The selected choices I can get through: ctx.CurrentItem....
0
votes
0answers
18 views

Display templates, managed properties showing null

In Sharepoint Online,trying to display one site collection list columns in another site collection using search and dispaly templates List:/sites/UAT/Lists/SearchTestList/AllItems.aspx 1.Mapped the ...
0
votes
0answers
12 views

Recurring events in CSWP

Ok, so I know recurring events can not be showed in a CSWP because only the first occurence is indexed. I have read a lot about that, but not found a single solution anywhere. How can I show ...
0
votes
0answers
25 views

Include external script in display template

I'm creating a custom search result display template. I'd like to reference an EXTERNAL javasacript. The only examples I've seen copy the JS file into a library on the server and reference it from ...
0
votes
1answer
43 views

SP Online - custom Display Template - square boxes instead of font icons from Office UI Fabric icon set displayed in checked-in state

I encountered a problem, that it displays only empty square boxes instead of nice (custom font) images from generated Office UI Fabric icons set, since I change the state of the with the web-part to ...
0
votes
0answers
37 views

Strange error in Display Template after removing other web part

I'm facing a strange error when a user edits a web part page. There are a couple of web parts on this page, like content editor, a search content web part (for displaying some user information from ...
1
vote
1answer
65 views

Creating custom display template with search result web part

I am required to create a display template programatically which is via visual studio and I am really new to this. Can anyone share with me a sample source code for creating display templates and how ...
0
votes
0answers
40 views

Custom Item Display templates not generating js file or showing up in web part

I've been working on a custom item display template for a CSWP. I made a copy of Item_TwoLines and renamed the file and tags during editing in NotePad++, then saved the HTML back to ~/_catalogs/...
0
votes
1answer
84 views

Display Template: extract Item Summary

Creating a custom display template for search we're facing this request: the search result item should show first the item hyperlink, then some managed properties and finally the item summary. In the ...
0
votes
1answer
13 views

Where are the css files used in search results stored in SP Online?

I'm customizing a search display template. There is an is a nice transparent overlay on a photo where I display text, but my text is no longer fitting in the overlay because I've added an additional ...
0
votes
1answer
25 views

How does property mappings work in Content Search Web Part

I am using the Content Search Web Part to display some drone photos. In the shot below, it is showing each building with the File Name and the date/time of the photograph beneath it. I would like to ...
0
votes
0answers
18 views

Search Display Templates not appearing

I'm using SharePoint Online. My root site collection has search display templates appearing correctly. I see the js and html files. I've created another Site Collection, and all I'm seeing are js ...
0
votes
1answer
23 views

Using 'replace' for URLs in Search Results display template?

I am building a work-around for an issue I've encountered with a product catalog. For some reason, the CSWP and Search Results web part are displaying spaces in the managed metadata term at the end of ...
0
votes
0answers
22 views

Documentation for display templates functions and variables

I am reading few blog posts, that use functions and variables like this: $htmlEncode ctx.ClientControl.get_nextUniqueId() var hiddenElmId = $htmlEncode(ctx.ClientControl.get_nextUniqueId() + "...
0
votes
0answers
10 views

Display Template vs WebPart

I am trying to understand the best practices around whether to use Display Templates or a Custom Web Part to display contents of a list on a Web Part Page. As an out an out developer I would err on ...
0
votes
1answer
40 views

Can jQuery Datatables in a search results web part return more than 50 documents?

I've hit a wall on figuring out how to remedy this issue. Im currently developing a search center page with jQuery datatables and control and item display templates. The search results webpart is ...
0
votes
0answers
15 views

Where are the CSS files that control how search result items are displayed stored?

I'm using a customer Display Template for PDF documents. The Title of the Document is being truncated (with ...) I've gone it Developer tools and it appears that the title display is controlled by ms-...
0
votes
1answer
39 views

Color Code Due Date in Display Template to Red

I have a great display template that is working almost as expected. I now have a request to have the Due Date show RED once it is past due. I am still learning how to change things in the display ...
0
votes
0answers
22 views

Limit to how many Mapped Managed Properties you can have?

I am working in a display template and it is only showing 10 of the 11 property mappings in the web part. I need to know how I can add the 11th property. I have already updated the field in the ...
0
votes
1answer
164 views

Display Template Date Format not working to display mm/dd/yy Please Help!

I have a display template that is working, however it is not displaying the date in the format that I want. I need it in the following format MM/DD/YY I had someone trying to help but they bailed on ...
0
votes
1answer
119 views

Display Template format Start and Due Date MM/DD/YYY

I have a display template that is working awesome but for the formatting of the Managed Property not displaying the date correctly. I do not want the time included in the display. I am still ...
0
votes
2answers
67 views

Making users display name searchable in display template

I have a search display template showing some documents based on a content type and one of the fields DocOwner, which is a people field. Using javascript it is simple enough to get the user's display ...
0
votes
1answer
23 views

Search - How to change default boolean operator from AND to OR

I believe this is controlled by the Search Box Display template, but I'm not 100% sure. Does anyone know? Thanks!
1
vote
0answers
19 views

Modify the Search Navigation display template

Can we modify the search navigation web part display template? I wish to add a bottom border to the selected page navigation header.
2
votes
1answer
91 views

SharePoint 2016 Managed Property not returning values in Search Hover panel

I have a Site Column "Doc Description" multiple line of text, added that in both list and library .Then Added few records in list&library published,created managed properties did full crawl and ...
1
vote
1answer
87 views

Search display template for content search web part for task aggregation

In a site collection, I have about 4 task list setup each on separate subsites. So on the root level, I am using a content search web part and through query, I am showing tasks from all of these 4 ...
0
votes
1answer
240 views

Custom refiner display template: Possible to change refiners' display names?

Does anyone know if it's possible to create a custom refiner display template that renders the refiner values differently to their native values? I have a managed property Manager act as a refiner: ...
1
vote
0answers
55 views

Apply custom Item Template to Promoted Results

We have hybrid search enabled in our SharePoint search environment where-in we are displaying federated search results from SharePoint Online tenant in our on-premise Search site. We display few top ...
1
vote
0answers
143 views

SharePoint 2013: Group Search Results by Site Name

I have added a Search box and a Search Results web part with the query which retrieves documents from different subsites. Now, what I want is to group this documents by using Site Name and show the ...
0
votes
1answer
65 views

SharePoint Display Templates doesn`t work with hyphen

As it seems hypens in Managed Properties are still an issue in SharePoint 2016 / 2013. I had an issue with an existing business application and did some tests to find out more. I created two managed ...
2
votes
1answer
136 views

How to change Search Display Template for Person Result Type

I am trying to add a link to the Hover Panel of the People Item Display Template. I've can't change the Display Template for the Person Result Type. It seems you can't edit Result Types provided by ...
1
vote
1answer
29 views

SharePoint Hybrid Search - Find published News in SPO

SharePoint Online provides publishing "SharePoint News" in modern sites. If you use SharePoint Hybrid Search you can find content from SPO on premise and vise versa. I would like to provide a ...
1
vote
0answers
60 views

output my search results filters after the initial render SharePoint 2013 / O365

I'm trying to write a custom filter display template. My template requires some external calls, and thus requires some async work. How can I output my filters after the initial render? I have to read ...
0
votes
1answer
79 views

Filter on the basis of Site Title (O365)

I am showing data from 30+ different SharePoint sites. In the search results page i want to filter the result on the basis of Site Name or Site Title. However in O365 we do not have option filter on ...
0
votes
1answer
190 views

Lost preview in hover panel after applying custom display template

Similar to this question: Custom Display Template, on one content type, lost preview on word files, powerpoint, etc, I have created one content source where multiple content type data will be fetched. ...
1
vote
0answers
110 views

SharePoint 2013 Retrieve URL from Publishing Hyperlink column in Display Template

Working on a site in SP2013, I have created a custom display template to display a series of items. The problem is when I reference the publishing hyperlink field in the html as the src value of my a ...
0
votes
1answer
168 views

Sharepoint 2013 Display publishing image using content search webpart with custom display template

I am working on a site in SP 2013 and want to display a series of items each with an image from a publishing image field in the item. I have created a custom display template but am having issues ...
1
vote
1answer
61 views

Custom display template for videos working for 1 of 4 videos

I've customized the Item-Video display template to surface data from some custom columns. It's working perfectly on 1 of the videos, but not the other 3 that I uploaded. They are all MP4's in the ...
0
votes
1answer
76 views

How to customize Display Template Hover Panel Header

I'm trying to customize the Header portion of my hover panel. The header is called in the Default Hover Panel like so: <div id="_#= $htmlEncode(id + HP.ids.header) =#_" class="ms-srch-hover-...
0
votes
1answer
367 views

Changes to Display Template not appearing

I have customized the Item_PDF Display template. I would like the hover panel that is displayed to be based on the Item_Person_Hover panel. The goal is to present expertise information about the ...
2
votes
1answer
196 views

Search Display Templates - How to display hover panel on click rather than on hover

I'd like to customize my Display Template so that the Hover Panel appears only when a user clicks on an item in the search result. The default behavior is the hover panel appears when a user mouse's ...
1
vote
1answer
120 views

Running custom function before SharePoint renders page

Some Background I have a publishing site that presents documents with stylized icons using some custom display templates and views (with CSR). Document icons are rendered using fontAwesome classes ...
2
votes
1answer
513 views

PDF Files not opening when clicked from the content search web part

I wrote a custom display template for a content search web part that shows recent documents edited or modified by a user. I added hover functionality as well to allow users to hover. For some reason ...