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
1answer
471 views

How to deploy display templates with pnp?

On SP 2016 on-prem I am trying to write a console application to upload files, mainly display templates. I create a dummy site collection, and upload display template in "_catalogs/display templates/...
1
vote
1answer
77 views

“Converting” project from old to new technology?

I am working on a SharePoint project which started a couple of years ago. It started with SP 2013 on - prem, and we are now on SP 2016 with feature pack 2. In the project we used the Powershell based ...
1
vote
0answers
52 views

How to modify the url in the search results?

I am using sp 2013 on prem. I created a new page and used the search result pagelayout. On this page you have the OOTB refiner, search box, search resultscript webparts. I would like to clone some ...
0
votes
3answers
1k views

Managed property not showing in Display template

We have a BCS-model which gets data from a database outside of SharePoint. We make data from the BCS searchable by creating managed properties and then mapping them to the auto generated crawled ...
3
votes
1answer
666 views

display List/library url in display template

I am trying to add the url of libraries in the display template. ListUrl does not return any value. So I thought using javascript to replace the filename to "". However it is throwing an error: ...
0
votes
1answer
211 views

How to encapsulate a .mht file in sharepoint online

I have some .mht files and I want to display in a sharepoint page. I'have tried the "content editor" but seems like in only work with HTML files. There is some solutions ?
0
votes
1answer
334 views

Increasing the page numbers of paging in SharePoint search

I am looking for some help on search display template. I need to change the code in Control_SearchResults.html file to increase the no of page numbers. Can someone please help me to get this. On ...
1
vote
2answers
1k views

Add modified date on search result of SharePoint 2013

I need the modified date of the item when search results displayed. kindly help me doing this. I referred some MSDN article, where they have mentioned editing HTML file of display template on "Design ...
0
votes
1answer
222 views

SharePoint search results not getting displayed to any user after adding new content source

I just added a new Content Source, Result Source, and Result Type in my on-premise SharePoint 2013 Search center. My search center displays results based on result types. When I search content, I can ...
0
votes
1answer
118 views

SPServices in a Display Template to retrieve blog comments

I have built a display template and used the CSWP to show blog post comments and likes, however, being a CSWP it only updates once the search runs. I want the comments or likes to update immediately ...
0
votes
0answers
83 views

How to create a SharePoint Search Result Item Type programmatically?

I have a requirement to update the Display Template for a given content type, I do understand that Display template can be deployed and published through "Feature activation". However, I see that New-...
0
votes
1answer
547 views

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

Currently working on a site in Sharepoint 2013, I have created a custom item display template to display links to related pages across the site on a page via the content search webpart. The items are ...
0
votes
2answers
6k views

How to change the search result display template based on list name?

I want to format the search result based on the list name. For example: If data is coming from ListName1 then I want to change the item URL in the search result. For all other result, I don't want to ...
1
vote
0answers
142 views

Display template - Managed properties column display name

I'm creating a custom display template, where I want to show the metadata field name and it's value. The problem is that the Managed Properties use the internal name, and not the display name. How ...
0
votes
1answer
144 views

search displaytemplate

I have the below code <td class="ms-cellstyle ms-vb2"> <!--#_ var clickType = ctx.CurrentItem.csr_ClickType; if(!clickType) {...
0
votes
1answer
251 views

Error on Hover Panel of Web page“We didn't find any more information about this result.”

I added Hover pannel to content search web part display template. I used Default Sharepoint"Item_WebPage_HoverPanel.js" to show web page JS. then I can see the only name of the page. and on the body ...
0
votes
1answer
625 views

An Approved Control Display Template Is Not Available in Web Part Settings

Can anyone suggest how I enable the out of the box control display template, List with Paging? In a SharePoint 2013 environment, in the web part settings for Content Search web parts, the out of ...
0
votes
1answer
721 views

Custom Search Display Template in SharePoint 2013 Foundation

In SharePoint 2013 Foundation, I have created a custom display template for search and have created a couple of custom managed properties. Due to an absence of the Publishing Feature, I only have the ...
0
votes
1answer
145 views

Calling a hoverpanel in a search result table

I am working with SharePoint 2013. I want to show my search results in a table view. I need this for the global search, not a webpart. I have modified ( with help from internet) the search display ...
0
votes
1answer
27 views

Changing back from default

terminology in this question is probably wrong since I am a new user When I tried to delete an app from Sharepoint a prompt told me that I had to change the layout of my website before I could ...
0
votes
1answer
66 views

The webparts in my search site have stopped working

Currently we have a version of sharepoint 2016 on-premise. The search site use to work fine but then suddenly one day they cannot find the js file for the webpart. i have confirmed and the js files ...
0
votes
1answer
251 views

Custom Javascript not being called on Search Display Item Template

I cannot determine why javascript function is not being called when paging through search result pages. On the first page load js executes as expected. When I do a hard refresh it executes ...
1
vote
0answers
118 views

How to display event dates with optional times in WebPart

In our Events web part we want to display Start & End dates for Calendar events. Some of our events are multi-day and probably have a midnight time, and these we want to display like so: e.g. 29 ...
2
votes
0answers
285 views

SharePoint Online Search Display Template

I am working on customizing the Search Results page by modifying the item display template. I have managed to add managed properties and display it in search results. The requirement is that I need to ...
1
vote
0answers
238 views

Display the ows_modified crawl property using SP.DateTimeUtil.SPRelativeDateTime.getRelativeDateTimeString will show wrong dates in display template

I am working on an on-premises sharepoint 2013. and i want to show the modified date for my documents inside a Search Result web-part. so seems there is not any built-in managed property for this. so ...
3
votes
1answer
492 views

Result Type to decide Display Template not working

Display template I have created a display template and uploaded it to _catalogs/masterpage/Display Template/Search. The related .js file is created. The display template file is published. Result ...
2
votes
2answers
1k views

Unable to find a way to show the document type icon inside my Search Result web-part, as some icons have .gif format while other are .png

I am working on a Search result web-part, which should show documents from multiple document libraries. now i am trying to display the FileType icon beside the items. so i tried the following ...
1
vote
0answers
65 views

SiteDescription managed property inside the display template will always show the site description in a single line

I have added a content search web part, to show all the sub-sites inside my parent site. and i chose the following properties to be shown:- so i chose to show the Path,Title & SiteDescription. ...
3
votes
2answers
617 views

SharePoint display template not showing in site

I've just created a copy of a display template in SharePoint and made a change to the styling then checked-it back in. I've also made sure that the Result Type is associate with the Display Template ...
6
votes
2answers
1k views

Images inside my Search Result web part will have their names = DispForm.aspx

I am working on team sub-site inside my sharepoint on-premises farm 2013. now i define the following criteria to show all the items inside a document library:- {searchboxquery} Path:"http://w*****/*...
1
vote
1answer
214 views

How i can build an Item URL inside my Search Result web-part, where this URL have the Source parameter equal to the current web-part page

I am working on an on-premises sharepoint farm 2013. and i have added a Search Result web-part, which uses 2 display templates (Results Control Display Template + Item Display Template). now i am ...
2
votes
1answer
522 views

Sharepoint Online: Search Results Found But Not Displaying

I have set up a search results web part on the home page of a Sharepoint Online site I'm working on. I've set it up to use the Local People Results source, and the query being used is {...
1
vote
0answers
118 views

Get lookup item url in Display Template using JS

as we all know, we can use managed properties in display templates like this: ctx.CurrentItem.myLookupField Let's say myLookupField is actually a lookup field (duh). How would I get the ID or, even ...
0
votes
1answer
243 views

Content Search web part costomization: remove the document icon from the 2 lines

I have removed the document icon but the line looks 'indented', does anybody know what code I need to touch to have the text in line with the box border on the left? I would like a code that can be ...
0
votes
0answers
64 views

Search Display template for anonymous User

I have a requirement where i need to show search results for anonymous users. Expected results are showing in search but it is showing default display template instead of configured respective display ...
0
votes
1answer
2k views

Sharepoint 2013 search result tabular display template example

Are there any tabular search result display templates that all you need to do is plug in the right managed properties and it works! that has a decent layout and maybe toggles rows in color and has ...
2
votes
1answer
516 views

How to get the subsite url from an image url in SharePoint Online using JavaScript?

I have a list of urls pointing to images, which are originated in various subsites - sometimes burried in nested folder structures. Now, my question is: Is there any way I can derive the url of the ...
2
votes
0answers
253 views

My custom Display template is showing incorrect characters encoding when i edit it inside sharepoint designer 2013

I am working on a SharePoint Farm 2013 on-premises. now using sharepoint designer i edit a display template (.html file) in advance mode under the following path :- all file>>catalog >> ...
6
votes
1answer
133 views

Is there any drawback if i created a duplicate new Managed Property inside my Search Service which have a user friendly Title

I am using a custom display template inside Content Search Web-part inside sharepoint 2013 enterprise. and the display template will be showing the results in a table format. and it will be using the ...
0
votes
1answer
1k views

Default Document preview is not working in share point 2016

I am using the search result web part to display the results. But in my case, the document icon is showing but the document preview is not showing. When I further debugged, it clearly shows that the ...
0
votes
1answer
567 views

Opening Link in New Tab Search Item Display Template Sharepoint Online

I followed this article to create a display item template for search. I want to open the title field in a new tab, right now when you click on the link from the search results, it opens in the same ...
4
votes
2answers
398 views

Display Template - link blog post comment to related blog post

If you use SharePoint 2013 enterprise search and you find a comment on a blog post in your results it will be given the Default Display Template (Item_Default.js) by default. It gives 3 values: ...
1
vote
1answer
588 views

Display template error for specific keyword search

I am facing a strange issue wherein when I try to search for specific search terms in SharePoint 2013 enterprise search, we get an error as: Display Error: The display template had an error. You ...
1
vote
1answer
115 views

SP online: how to delete a wrong js in the display templates

I have created a copy of a js file of a display template. I have tried to delete it with no success even with sharepoint designer. How do I get rid of it?
2
votes
0answers
74 views

How do you localize ECB custom actions?

I have created two custom action buttons using javascript but they need to be localized (fr/en). I have server side Resource files and client side ones as well. This is how I'm creating the actions: ...
0
votes
1answer
601 views

How sharepoint Search chose which fields to be shown inside the default display template for the list items

I am working on a sharepoint server 2013. and i have a list which contain the following built-in fields:- Title Description and so on.... now when i search for list items i always get this display ...
1
vote
1answer
291 views

Missing property sync link in result types

I'm following this tutorial on how to add a custom/existing managed property mappings of an item template. About halfway down she mentions that after adding the property to your template you need to ...
1
vote
1answer
74 views

How to Show All Search Verticals?

We are woking on a search center that needs 6 search verticals (everything, doc, news, events, people, pages.) If it's just 5 verticals, everything align horizontally fine. However, if it's 6 ...
1
vote
2answers
467 views

Sharepoint Online Search Results Sort by String with Text and Numbers Failing

In Sharepoint Online Search Center, I am having trouble sorting the Search Results using a Managed Property Text Field, as shown here: I have set the Sorting options in the Search Results Web Part ...
1
vote
1answer
488 views

How to disable hover panel for mobile devices

I am using https://responsivesharepoint.codeplex.com/ for my sharepoint site. So I have bootstrap integrated to my SP Site. Can anyone tell me what is the most elegant way of disabling hover panel ...

1
2
3 4 5
8