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
149 views

Custom Display Template - Apply predefined filter on initial search results load

We have customised display templates and there are custom refiners as well which is all working fine, instead of refined value change, we have added Apply filter button and results filtered on this ...
1
vote
1answer
4k views

SharePoint Display Template ctx.CurrentItem

I am pretty new to SharePoint and I am trying to customise the search in a SP site that I did not create myself. I downloaded a Display Template off the Internet, which shows the search results in a ...
1
vote
1answer
152 views

Error when editing Sharepoint Display Template

When I'm trying to edit a display template, I'm getting the following error: HtmlDesign:[Unexpected exception:ItemUpdated] for key[_catalogs/masterpage/Display Templates/search/Control_Compact.html] ...
1
vote
1answer
490 views

Is there a library of example display templates?

The standard sharepoint display templates for the CSWP are very limited. I would assume that someone has already made and shared some display templates for general document searches. Are there any ...
1
vote
0answers
554 views

SharePoint 2013 Search Results Display Template not showing all results

I have a search results display template for a video library. Each video has a category (DiscussionCategory), a Chapter (CustomDTListChapter) a section (CustomDTListSection) and the title itself. My ...
0
votes
1answer
1k views

Where can I learn more about “ctx” from sharepoint js/html control templates?

Is there really no documentation for this? To summarize the comments, no in 2015. I have searched msdn/technet and google. My most common problem is just not knowing the right keywords to search for ...
2
votes
1answer
974 views

adding line to display template 2013

I want to add lines to an OOTB display template, pic on left and 3 lines on right. Am I missing something? I can post the OOTB template for Pic on left 3 lines on right if needed. Do I need to include ...
0
votes
0answers
118 views

Trim ID from metadata returned in a search display template

I want to return metadata in the search results. How can i trim the results and only show the term and not the ID?
1
vote
2answers
186 views

Can't get Javascript CSR display template to work in listview

I'm totally at wits end here. I am trying to use CSR to display custom html depending on a "case status" column. I've added the JS file to the masterpage folder and used the JS Link to connect it. No ...
0
votes
1answer
2k views

What is easiest way to custom display templates in SharePoint 2013 Search

I want to create custom display templates in SharePoint 2013 Search. I need the steps to create it. This is first time I am dealing with customization of search templates. Any step by step reference ...
3
votes
0answers
523 views

Display Template lookup column additional fields

I have a search based solution where I work alot with Display Templates to render out results in a fancy way. It all works fine and dandy with Managed Properties mapped up etc. However, I've come ...
0
votes
1answer
149 views

Display Person's Documents in People Search Results Display Template

I am building a people results in display template that needs to include a link to an individual's CV in a document library. I've used a SPServices Getlistitem to query the list, but I can't get the ...
1
vote
0answers
192 views

Sorry Something Went Wrong while building a query

I recently built a new SSA and performed a full crawl on all content sources, all search results appear to be fine, however when building a query, no matter what I put in or use I get the Error "Sorry,...
0
votes
1answer
2k views

Display Template: Retrieving user properties from person field

I've been searching high and low for a couple of days for a solution, but can't find anything that fits. I've seen a lot of blogs refer to the Srch.U object and then using various methods. I've seen ...
0
votes
2answers
784 views

SP2013 - Change refresh interval of “Search Results” webpart

Is it possible to change the refresh interval of a single "Search Result" - Webpart? Currently it updates every 15 minutes. I've created a search result + display template which queries for a list of ...
0
votes
1answer
1k views

'Search on Yammer' link in search center refiners

I have a heavily branded site I'm working on and can't find where the "Search on Yammer" link is being populated from. It appears within the search refiner/filter web part in the left column but none ...
0
votes
2answers
338 views

Query the month portion of a SharePoint column in the query text of a Display Template

How do I query against the month portion of a SharePoint Column in a Display Template? I've added a Content Search Web Part (CSWP) to my page and I need to restrict the number of items returned from ...
0
votes
1answer
89 views

Making my copy version of Control_SearchBox.html

Within SharePoint 2013, I am in the Display Template -> Search Folder. I see the Control_SearchBox.html page. I downloaded a copy of this file. I made tweaks to it based on some custom branding ...
2
votes
1answer
259 views

SharePoint Search Display Template

I am working on Office 365 and I need to fetch Value of Location, Start date and End Date fields (Calendar fields) in Search Display Template (Item_CommonItem_Body.html). But everytime it returns ...
0
votes
0answers
659 views

Unable to display mapped property on display template

I have mapped "otherTelephone" to the "Extension" field in my managed property mapping, but I am unable to now display this on a custom display template. In the display template, I have the following ...
2
votes
1answer
2k views

In a search display template, is there a search property available for the actual text (k=…) in Srch.U or any of the search objects?

I'm trying to add the searched text value to the query string in the url (<a href='...?searchText=[something]'>Title</a>) In the search display templates, I see ctx and Srch objects ...
0
votes
1answer
263 views

Content rollup and display template issue

I am using this custom display template with a search results web query to roll up tasks. http://www.surfray.com/blog/2013/06/12/aggregate-your-open-tasks-with-sharepoint-2013/ I have followed the ...
0
votes
0answers
1k views

Display Template and Item Template not showing in Content Search Web Part

I am facing a weird issue. When I'm uploading custom Display Template JS file and custom Item Template JS file using an Add-In, for some reason it is not showing in the webpart properties. But when I ...
1
vote
1answer
648 views

Get Item Child Count in search results

I have a picture library which consist of 2 content types: "Photo Album" and "picture". I also have made a search site to search the albums. I have made a custom item display template which show the ...
1
vote
1answer
338 views

Search box not taking custom display template

I am wanting to change the text inside the search box so I created a new display template and referenced it in the master page like so: <SearchWC:SearchBoxScriptWebPart UseSiteCollectionSettings="...
1
vote
1answer
280 views

Add content to a rich html field on a pagelayout

I have a page layout and in this page layout there is a rich html field. I am wanting this rich html field to have 2 columns whether it be done by a table or two divs within the rich html field. Is ...
1
vote
0answers
3k views

How to Group Search Results Using Default Display Templates

Is there documentation on how to create groups for search results, preferably using managed properties? All that I was able to find on it is using query rules, result blocks, or this great tutorial: ...
2
votes
0answers
855 views

Missing Display Template folder

recently when we use "search this site" searchbox this Error displayed: "Display Error: The display template had an error. You can correct it by fixing the template or by changing the display ...
0
votes
2answers
799 views

AddPostRenderCallback doesn't fire on subsequent page clicks

I have an AddPostRenderCallback that is working correctly when the page first loads but when I click to the second or third page of results it doesn't fire again. It's just some additional jquery and ...
3
votes
2answers
1k views

Get system name and label from term in Display Template

I'm retrieving a taxonomy field from a search request in a Display Template. The content of the field looks like this: termField.inputValue "GP0|#f76c1099-c0e6-f6df-7814-cc7ea541b129 L0|#0f76c1099-...
1
vote
0answers
263 views

2013 - Get URL and picture from mysite in Search result webpart display template

I have a search result webpart and want to display users there. The users are in a list (the field is a people picker). I registered the field as a managed property. I can get the name of the Person ...
0
votes
1answer
598 views

Search display template for special column types like Person or Group

I have lists of a special item content type that I list using search. These list contain for instance a column of type Person or Group. In the lists the columns are being displayed as "Name (with ...
2
votes
2answers
361 views

Display Template Syntax highlighting

I am a WebStorm user.. never touch Visual Studio All Display Templates in HTML are comments, and displayed accordingly in my IDE Does Visual Studio (Code) do syntax highlighting and intellisense on ...
2
votes
2answers
3k views

Adding onpage CSS in Control Display template

I am trying to add CSS in <style> tag in Control Display template. But its not applying that CSS. Its taking inline CSS but not taking when adding inside <Style>Tag PS: New to display ...
1
vote
0answers
273 views

SP2013 Display template , slider

I have used content query search web part & applied slideshow but that is not working properly. I am trying to create a news slider with big image which will come from a list , it is showing title ...
1
vote
1answer
539 views

Render UL and LI in search result display template

I am customizing sharepoint search result web part and trying to render Ul and li tags, following are my control and item template html files my control template my item template result but ...
0
votes
1answer
296 views

Display template with managed property based on column of type Hyperlink or Picture

I have added a column with content of type "Hyperlink or Picture" to some of our lists of a particular content type (SharePoint 2013 on premises). In the lists the data is being displayed pretty as a ...
3
votes
1answer
1k views

ctx.CurrentItem undefined in new function

I am editing a item display template in SharePoint 2013. The following problem occurs: ctx.CurrentItem becomes undefined in a custom function. How can I solve this? Here is a little code snippet: ...
1
vote
1answer
494 views

Async wait till variable is set in the display template

I have a problem with excuting the script in the right order. I have a custom.js which is loaded at the top of the masterpage. The following function is included: var results; var followers; ...
2
votes
0answers
57 views

Collection has not been initialized(async)

I am trying to create with search(display templates). To return a list with only the followers. The following error is throwing when running: "Error: The collection has not been initialized. It ...
1
vote
1answer
134 views

Search display template

In a previous Sharepoint set-up a created a sub site /search and copied my custom display template in the folder: /_catalogs/masterpage/Display%20Templates/Search The folder contains HTML and ...
1
vote
1answer
404 views

Display template for FAQ search page

I have a number of FAQ lists spread around my site collection (SharePoint 2013 On premises). These lists have special content type, "FAQ Item", that basically has columns for Question, Answer, Area ...
2
votes
0answers
384 views

modify the picture width and height in a content by search webpart display template?

I created a custom item display template. This custom item display template is using my custom hover display template. In my hover display template I get a managed property CustomImage. When I add ...
3
votes
1answer
540 views

Office 365 : CSWP & Display template : display custom image when no results

I'm a little stuck on a problem where i'm sure you could help me : What i want : I want to add a Content Search Webpart to a page, which check all the items added today in a certain Image Library ...
3
votes
2answers
3k views

DateTime.Now in KQL

In SP 2013 on-prem, I am using display template and a list to show alerts on the front page of the intranet. I want the alerts to be showed from the list when the list item has a start date that is ...
0
votes
1answer
172 views

Managed property for changes on site?

In SharePoint 2013 on-prem I am using display templates to list out sites. I need to show the sites that have had any kind of updates lately. I am looking for a property, that is a date and time ...
8
votes
1answer
1k views

Show correct content type with custom display item

I am using the following code in a custom display template for my search results to show the correct content type of an item: _#=ctx.CurrentItem.ContentType=#_ The good part is that it returns the ...
2
votes
0answers
446 views

Sharepoint Search Result Display Template not showing custom managed metadata properties

I have expanded the Item_Person display template to include a couple of custom managed metadata properties. When this template is used in a person-only search, these properties gets data. However when ...
1
vote
0answers
55 views

'Self Search / Put your profile to work for you' always empty

When I do a 'Self Search' in SharePoint 2013 the counters below 'Put your profile to work for you' are always 0. I used reflector to determine to logic behind this functionality and looks like the ...
4
votes
1answer
1k views

Display template not updating outside server?

We have a SharePoint on-prem 2013 farm with 2 app, 2 WFE, 2 search and 2 SQL servers. We recently updated a display template and added a new Content Search web part. While we can see that new ...

1 2 3
4
5
8