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
2 votes
0 answers
466 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 ...
Pantani's user avatar
  • 520
1 vote
0 answers
56 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 ...
RBDev's user avatar
  • 213
4 votes
1 answer
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 ...
Ilyas's user avatar
  • 1,341
2 votes
1 answer
138 views

How to handle & and + characters in hyperlinks in the search People hover panel template

In our SP Server 2013 environment we have an employee directory. The hover panel that shows up next to a result shows the Department name of an employee. This is a clickable hyperlink. When a user ...
Piet Schat's user avatar
1 vote
1 answer
2k views

Sharepoint 2013 : Increase width and number of characters in search refiner web part

Is there any way to increase the width and number of characters in search refiner web part in SharePoint 2013? I remember there was this option in SharePoint 2010. I know we can tweak CSS and ...
Maddy's user avatar
  • 199
1 vote
1 answer
160 views

Hide link to document library in Search SharePoint 2013

I have requirement from customer where they want to hide the link to document library. Marked yellow in the following picture: Is it possible to do it? If yes, how?
Maddy's user avatar
  • 199
0 votes
1 answer
309 views

Item_CommonHoverPanel_Actions display template: Click event doesnt fire second time

I have added a custom action "Test Link" to item_CommonHoverPanel_Actions display template as shown in figure below: Every thing works fine if i hover over Test 1 and Click on "Test link". But if i ...
Maddy's user avatar
  • 199
2 votes
2 answers
2k views

How to check if picture exists in item display template?

I tried to check in my custom item display template if a picture exists by url. Sometimes the site Logo is set to some path of an picture, but the picture doesn't exist anymore. I would like to ...
Ola's user avatar
  • 4,405
2 votes
0 answers
28 views

Showing joined list connections in search results hover

I have searched for this but haven't found any examples (maybe it's my searching abilities) but I am hoping to solve the following problem in SharePoint 2013. I am trying to replace a document ...
Roy's user avatar
  • 21
2 votes
3 answers
4k views

How do I format a Date for my local region in a customised SharePoint Display Template

How do I format a date in a customised search Display Template to show the date in my Region rather than UTC. I use the following XSL in Content Query Web Parts to present the date in my timezone, ...
Hayden Sinclair's user avatar
2 votes
1 answer
415 views

Customizing item_CommonHoverPanel_Actions display template

I customized the item_CommonHoverPanel_Actions display template and added custom link to it. Whenever user clicks on the link he/she is redirected to another page. What i am trying to do now is to ...
Maddy's user avatar
  • 199
3 votes
1 answer
1k views

getItemValue() getting the value twice?

I'm working on a Content Search WebPart which displays a list of pages. The third line, in my properties, returns a PublishingPageContentOWSHTML. But is it normal that its value appears twice, once ...
Hanayoru's user avatar
0 votes
2 answers
4k views

How to remove the seconds part from a date and time property

We have a standard Calendar app in SP2013 with some events that we roll up on a homepage using a content search web part (the Two Lines display template). We show two properties: the title and the ...
Piet Schat's user avatar
1 vote
2 answers
794 views

How to get logged in username in custom display template for CSWP using CSR

I am using a custom display template for Content search web part. I am able to get currentItem's properties but how to get logged in user's username using client slide rendering.
Yayati's user avatar
  • 1,728
1 vote
2 answers
316 views

How to control the order of my javascript logic in my display template?

I have created a custom item display template. In this custom item display template I try to check if the current user has contribute permissions to the item. The item is an sitecollection. If the ...
Ola's user avatar
  • 4,405
1 vote
2 answers
998 views

Check clientside if current user has contribute permissions on current site?

I would like to check in the item displaytemplate if the current user has contribute permissions on the current item. The current item is an site object because in my search query I use contentclass:"...
Ola's user avatar
  • 4,405
3 votes
2 answers
6k views

How to add mobile phone number to people search results?

I'm trying to add some more information to the peopleresults.aspx. I tried to follow the instructions here but I get an undefined error for the has_mPhone variable. Is there something wrong is ...
jlai's user avatar
  • 660
0 votes
2 answers
1k views

How to show default picture in display template if no picture found on the item?

I have cloned the OOTB displaytemplate "Item_PictureOnTop.html". I would like to show a default picture if the picture not found on the item. Is that possible with custom css? example here of current ...
Ola's user avatar
  • 4,405
1 vote
2 answers
746 views

Why is my custom display template not selected in my provisioned page?

I created custom display templates (control and item). I provision also a new page. This page is using my custom pagelayout with some webpart zones. I add some webparts inside this webpartzones by the ...
Ola's user avatar
  • 4,405
2 votes
1 answer
1k views

How to deal with asynchronicity in display templates

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've ...
Steve B's user avatar
  • 7,488
5 votes
1 answer
377 views

Display templates written in html alter for loops

In a display template (a filter item template to be precise), I observe a weird behavior with for loops. Let's say my template consists in: <div id="CustomRefinement"> <!--#_ for(var x=...
Steve B's user avatar
  • 7,488
1 vote
1 answer
650 views

Can't display a Refinable String in my Item Template

I have created an item template, which is a copy of the 'Word Item' template. Within the libraries I'm searching against, I have a Yes/No field called 'privatedoc' which I have mapped to the '...
Kelvin Hoyle's user avatar
0 votes
2 answers
1k views

Custom properties not shown in search results, but in profiles shown

Im connect custom attributes in profile service AD item (homePhone, CellPhone), after sync they are shown in profiles (private sites). Then Im add this properties in display templates of search ...
Pavel Kolbasov's user avatar
3 votes
1 answer
99 views

After changing display template of search results - search isn't working

I'm changing a display template (copy Item_Person, modify, and add Item_Person_WorkPhone) and adding a new search type. It works, but only with my administrator account. Users with Read permission ...
Pavel Kolbasov's user avatar
0 votes
2 answers
299 views

Why can I not publish an item display template?

I have built an item display template which I have added to the contents web part folder in the masterpage gallery. I need to publish this template - When I try to select the item (or any other item ...
Jamie_lee's user avatar
  • 427
0 votes
1 answer
2k views

Customize People display template on Everything scope (results.aspx)

I've successfully created a new People display template (Item_Person.html) and associated result type, and used it on the peopleresults.aspx page. Now, I'm trying to achieve the same effect on the ...
Tracy's user avatar
  • 667
0 votes
1 answer
592 views

Search result web part - item display template - How to retrieve images from article

I'm trying to show results with a simple display template. But I get a error: Cannot read property 'getPictureMarkup' of undefined How do I retrieve images with search result? I was hoping that I ...
Plexus81's user avatar
  • 2,250
0 votes
1 answer
2k views

Get site title and display it search results

I am using display templates to search specific items based on content type and display them in the root site. One of the requirements is to display the site title besides the item. Searching on the ...
Imir Hoxha's user avatar
  • 1,905
1 vote
3 answers
977 views

How to display site's title in search results

Using display templates, how can I display the site title next to item(s)? I don't see there is a OOTB managed property.
Imir Hoxha's user avatar
  • 1,905
1 vote
0 answers
2k views

How to make Content Search Web part look like OOTB list

I am trying to query a few lists in subsites and I have been asked to display them or have a look and feel of OOTB Lists. with the capability to filter, sort. How can I do that? is it easy to build ...
Imir Hoxha's user avatar
  • 1,905
0 votes
1 answer
4k views

display HTML styling to a div using content templates and JS

I am busy working on creating a 'new and announcements' web part for a client using a 'News' list, a content search on a New content type, and displaying it using a display template and javascript. ...
Simon's user avatar
  • 705
1 vote
2 answers
2k views

SharePoint 2013 Modal Dialog in Display Template

I am working on a custom action in the item_commonhoverpanel_actions display template that links to the item properties (dispform.aspx) of the item. So far it's working, however I would like to show ...
KevinvG's user avatar
  • 85
1 vote
1 answer
2k views

Control Display Template

I created an Item display template and a result type for this template, I can see the Result type when I try to change the webpart properties for a search results webpart but.... for the Control, I ...
yngrdyn's user avatar
  • 918
4 votes
1 answer
2k views

Display templates - HTML and conditional formatting

I'm working with a custom hover display template where I am trying to display an optional description (multiple lines of text) column with 2 additional breaklines (<br>) to give the text some ...
Christoffer's user avatar
  • 9,801
1 vote
1 answer
608 views

Render a users Lync status in a display template

I'm trying to render the author field in a custom display template to show the Lync presence icon. I would like to get a result similar to this template that displays the presence and the name. But ...
Christoffer's user avatar
  • 9,801
1 vote
0 answers
364 views

SharePoint 2013 Search Center - Alternative for $includeLanguageScript?

Is there an alternative approach to loading the language resource files with $includeLanguageScript in SharePoint 2013 Search Center? Sometimes it happens that the file is not loaded fast enough, ...
user43914's user avatar
0 votes
1 answer
110 views

Get the same display templates for CSWP as for search results

Is there any easy way to use Content Search Web Parts but to be able to use the exact same display template as already defined for search results? I tried copying the .aspx files (control and list) ...
Yoh's user avatar
  • 101
8 votes
2 answers
16k views

Custom calendar display template / JS Link

I'm looking for a nice custom calendar. Display template or jslink, doesn't matter. Something like that would be awesome: http://deviprsd21.github.io/Calendario/index2.html Has someone tried to add ...
Patrick's user avatar
  • 3,203
0 votes
1 answer
22 views

Custom property for people profiles

I have added 1 new property to people profile named "DepartementTest" and filled it out foreach user. I have added my new property to my custom display template. I have built a people-dictonary and ...
Anders's user avatar
  • 969
1 vote
0 answers
91 views

Item template doesn't include ListItemID?

I have a content search webpart and am using a modified version of the default Item-Picture3Lines.html template. The custom parts are to add our own "like" button. <div class="like-icon" data-item-...
Rothrock's user avatar
  • 3,010
0 votes
1 answer
378 views

Unneeded display template js files loading

I have several search results web parts on my page that all use custom display templates. Upon doing some performance testing I'm seeing several js files being loaded that aren't needed and I'd like ...
Aaron's user avatar
  • 732
1 vote
0 answers
163 views

Search Result Block with Custom Managed Properties

I have a query rule that triggers the display of a result block. I have a couple custom managed properties I'd like to display in the result block, but they always show up empty in my display template....
Ryan Kazmerik's user avatar
0 votes
0 answers
156 views

Display template conditional format

I've been working on a display template to format a timeline. Right now I'm working on conditional formatting to show icons for each content type shown in the timeline. The conditional works fine as ...
Yeretho's user avatar
  • 81
0 votes
1 answer
485 views

Display template get rid of the height and width when asking for picture URL

I'm having a display template (item) that gets a picture URL. ex: var pictureURL = $getItemValue(ctx, "Picture URL"); picture URL is then www.awesome.com/picture.jpg?width=100&height=100 ...
Plexus81's user avatar
  • 2,250
2 votes
3 answers
2k views

Make Search Results open in new tab

Ive implemented a SharePoint 2013 Farm Wide search for my site collections, and now want the URL's that get returned to open up in a new tab. Is there a relatively effortless way to do this rather ...
Simon's user avatar
  • 705
0 votes
1 answer
2k views

JSLink conflict with lists of the same type (List Custom 100)

Problem I've two custom lists with ListTemplateType = 100. When I insert both into a page, the last rewrite the first. I tryed add BaseViewID with diferent ID, like this question. But anything ...
Carlos's user avatar
  • 319
0 votes
2 answers
550 views

Modify the foot of Item HoverPanel in Search results SharePoint 2013

I want to add 4 buttons to the bottom of display template Item Default HoverPanel for search results. I need it display like the person column with user's name and photo. By default, it displays Open ...
AnnaCICI's user avatar
  • 533
2 votes
1 answer
728 views

Display a person column in search result webpart SharePoint 2013

I want to add a person column with person's name and image in search result webpart. I create a item display template and add this property "Team Member" to this custom template. But the results ...
AnnaCICI's user avatar
  • 533
1 vote
0 answers
398 views

SharePoint Foundation Display Template - managed metadata missing

I'm trying to customize the display of search results in a SharePoint Foundation 2013 environment. Since this environment doesn't have the publishing feature, I'm creating the HTML display template ...
Ivan Wilson's user avatar
1 vote
0 answers
99 views

Displaying list items in my site

I have a need to display content from a list in another site collection on every users My Site page - About Me (/person.aspx). The list is essentially responsibilities for users. So the list needs ...
user20414's user avatar

1
4
5
6 7 8