Questions tagged [display-templates]

Display template is a html template which can be repeat for each item in its model and it will load in specific section of a view of asp.net web application. A template can have styles/scripts or Razor codes in itself also.

102 questions
1
vote
2 answers

How to bring Local People Results in between Local SharePoint Results in SharePoint 2013 Everything Search Results Page?

i have created the new query rule to bring the People Search Results to top of the everything search results page I just Followed the below link to create the results like below. 1. Sharepoint 2013 adding people to everything page But Actually i…
1
vote
0 answers

SharePoint - 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:…
LaLaLottie
  • 393
  • 1
  • 4
  • 17
1
vote
1 answer

SharePoint - Display Templates - Accessing the Client Context Object

So I'm creating display templates for SharePoint and I'm having trouble getting the context as I'll need it for accessing different lists and their items, etc. One way to do it that I've seen while searching is this: var context =…
LaLaLottie
  • 393
  • 1
  • 4
  • 17
1
vote
1 answer

Iterating a Collection of ViewModels deriving from an AbstractViewModel and DisplayTemplates renders both DisplayTemplates

(Apologies for title .. was hard to nail down) I have a situation where a controller will build a List which will contain a set of ViewModels derived from the abstract base class. I then use display templates to render the content appropriately, but…
Simon Rigby
  • 1,786
  • 4
  • 17
  • 28
1
vote
1 answer

SharePoint 2013 People:Assistant returns empty when created as Managed Property

If I create a Managed Property that points to the People:Assistant property it always returns an empty string if set to text or undefined if set to binary. The Assistant property is of type Person and I want to use the properties to create a link…
Charlie
  • 376
  • 1
  • 7
1
vote
0 answers

Open documents with office 365 in SharePoint Online

I have a display template called "Item four lines" based on the out of the box "Item two lines" template which I modified to shown 4 lines rather than 2. My documents are coming up correctly to match my search query, however when I click on the…
Dev P
  • 1,157
  • 5
  • 32
  • 54
1
vote
3 answers

Sharepoint 2013 - Open search result in new window/tab

Ok, so I've been struggling with this problem for a few hours now... I need to modify the links in the search results, so that they open in a new window/tab. Specifically it's the search results that links to a "off-site"-hit. I've created a copy of…
pydis
  • 11
  • 1
  • 2
1
vote
0 answers

DisplayTemplate for Enum not working for some values

I have a model as enum class named Priority. I have an editor template for Priority and a display template for Enum. In the editor template, I create a dropdown listing all possible values of Priority and showing glyphicon next to the text. The…
Gokhan Kurt
  • 8,239
  • 1
  • 27
  • 51
1
vote
1 answer

property mappings in display template

I think I'm missing something with the ManagedPropertyMapping tag on display Templates. Indeed I have this code originally: