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
1
vote
0answers
22 views

Search Display Template code no longer able to access CurrentItem.UniqueId

I have a SharePoint Online site that uses some custom Search Display Templates to display content from Document Libraries and Picture Libraries. The JavaScript code had been running fine for a couple ...
0
votes
1answer
36 views

How to change "There are no items to show" message for Item Display Template?

We are using SP2016 enterprise and I am trying to customize a Item Display template for a Content Search web part. My work is based on existing template under Master Page Gallery > Display ...
1
vote
1answer
28 views

RecordPageClick parameters

I need to change the search criteria paramater that is passed onto RecordPageClick method vis JavaScript I am hoping to do this in the display template or the search page template What is the best way ...
0
votes
0answers
12 views

$isEmptyString function is not working in Display template

I am customizing a Content Search Webpart. I need the webpart return all the subsites's SiteLogo. If sitelogo is empty then show a default picture. According to this old thread, I use $isEmptyString ...
0
votes
1answer
38 views

How to call a JavaScript inline of Item display template?

I am editing an Item Display Template (for a content search web part) on SP2016 enterprise. In the display template (Item_LargePicture.html), I inserted a JavaScript function to randomly return a ...
1
vote
0answers
35 views

Sharepoint 2019 - modify search result item template to return Office URI Schemes

I am looking for a way to open word, excel, ppt files in a local client application. For any mysterious reasons that work in document libraries but not in search results. I know that it works if I ...
0
votes
1answer
37 views

Managed Properties created for list column showing empty in Item Display Template

Good Day! I have created a Description column in my list and created managed property with ows_Description as the crawled property. The column type is Multiple lines of Text. I am not able to retrive ...
1
vote
2answers
497 views

SharePoint List Template using Handlebars

I have a SharePoint Online list that has a column of type "Hyperlink" named URL. The Hyperlink column in the SharePoint list had two fields by default, "Enter a URL" and "...
0
votes
0answers
19 views

Display Template Error

I've customised a display template for a catalogue of images, and upon clicking the thumbnail, I want the image to download. So I changed the script from: <div class="zoom-...
0
votes
1answer
179 views

SharePoint Template Grouping Using Handlebars

I have a SharePoint Online list that includes a title, URL, and a category. My category options are "Forms" and "Tools". I want a HandleBars template that will loop through this list and group by ...
0
votes
1answer
39 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
90 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
37 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
103 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
195 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
1answer
79 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
1answer
79 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
1answer
138 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 ...
1
vote
1answer
144 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
1answer
309 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
32 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
157 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
1answer
77 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
1answer
61 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
1answer
62 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
1answer
262 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
362 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
147 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
31 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
23 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
359 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
180 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
352 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
73 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
152 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
135 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
341 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
76 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
68 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
184 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
449 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
172 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
288 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
65 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
99 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
619 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
320 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
199 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
783 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 ...
0
votes
1answer
125 views

Random seed in search result webpart query

I am looking for a way to randomize a result table. I used to do this via REST-API like this var randomSeed = parseInt((Math.random() * 1000000), 10), searchUrl = _spPageContextInfo....

1
2 3 4 5
8