none
O365 Customize results.aspx People Display Template RRS feed

  • Question

  • According to this posting, the display template that is used to render People search results on the 'Everything' scope (results.aspx page) is Item_Person_CompactHorizontal.html.  I have created a copy of that file, edited it, and associated it with a new result type (see below).  If I select that Display Template explicitly within the search results web part on the results.aspx page, then I see the change. 

    However, when I select to use result type rules (see below), the change does not show.  Does this require a full search crawl to reflect the changes?  In the past, I've had to wait up to a week for search changes to appear as the result of a full crawl in O365 (ridiculous, I know).  It's only been 5 days so far, but I want to make sure I'm not missing something. 

    Thanks!

    -Tracy



    • Edited by Tracy'S Tuesday, August 25, 2015 6:55 PM
    Tuesday, August 25, 2015 6:54 PM

Answers

  • Hi Victoria,

    I have not found that to be the case in O365.  The (site collection) result type I created took nearly a week before it finally showed as the priority result type display template on my page.  Editing the result type does not appear to have any effect.  That leads me to believe it requires a crawl of some sort. 

    Regarding customizing the Item_Person_CompactHorizontal.html display template, I cannot see a way to do this without editing the original OOB file, as there is no result type mapped to this template.

    Warmly,

    -Tracy

    Friday, August 28, 2015 2:21 AM

All replies

  • Hi Tracy,

    How did you define the conditions for the new result types?

    I suppose that if there is no specific differences for the new result type with default result types, SharePoint will render the results with the template for default result types.

    Please make sure that the conditions set for the new result types are specific ones.

    Thanks,

    Victoria


    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact tnmff@microsoft.com.

    Wednesday, August 26, 2015 10:40 AM
    Moderator
  • Hi Victoria,

    Thanks so much for the response!  My understanding is that the selection is based on the priority of the result types (see column in the image above) matched with the result source (in this case People).  I've created a custom version of the Item_Person.html display template and a corresponding result type for the People results page (peopleresults.aspx), and it's working as expected.  You can see it in the screen shot above (MACUPerson), and it is utilizing my custom template over the default one.  I did not include any additional conditions.

    Warmly,

    -Tracy

    Wednesday, August 26, 2015 6:48 PM
  • Hi Tracy,

    You are right that the results will use the display template based on the priority defined.

    And it also has a hierarchy for the result types: current site, site collection, search service.

    Please check if there are result types defined for the same condition in current site where you do the search.

    Please also clear cache in Internet Explorer and then check how it works.

    Thanks,

    Victoria


    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact tnmff@microsoft.com.

    Thursday, August 27, 2015 2:00 AM
    Moderator
  • Hi Victoria,

    There does not appear to be an existing OOB result type that corresponds to the relevant display template (Item_Person_CompactHorizontal.html) - see here.  Given that, I don't really see how it would be possible for me to override the existing template without editing the original, since there is no result type for me to 'override'. 

    Thoughts? 

    Thursday, August 27, 2015 3:17 PM
  • Hi Tracy,

    As I did more research on this issue, it seems that we need to edit the result type again to make it take affect when using result type rules to decide.

    You just need to edit the result type and save it without any changes.

    Thanks,

    Victoria


    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact tnmff@microsoft.com.

    Friday, August 28, 2015 1:44 AM
    Moderator
  • Hi Victoria,

    I have not found that to be the case in O365.  The (site collection) result type I created took nearly a week before it finally showed as the priority result type display template on my page.  Editing the result type does not appear to have any effect.  That leads me to believe it requires a crawl of some sort. 

    Regarding customizing the Item_Person_CompactHorizontal.html display template, I cannot see a way to do this without editing the original OOB file, as there is no result type mapped to this template.

    Warmly,

    -Tracy

    Friday, August 28, 2015 2:21 AM
  • Hi Tracy,

    The Item_Person_CompactHorizontal.html display template is used to displays a search result that is customized for showing a person in a compact and horizontal layout in Everything tab.

    And by default, there is no result type associated with this template.

    Since your new question is not directly related to the original issue, it would be better if you open up a new thread for the new question, in this way, our discussion here will not deviate too much from the original issue. This will make answer searching in the forum easier and be beneficial to other community members as well, and I will look into this issue in new thread.

    Thanks,

    Victoria


    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact tnmff@microsoft.com.

    Monday, August 31, 2015 8:13 AM
    Moderator
  • Yea, I could start a new thread.  Or people could just go here for the answer

    Warmly,

    -Tracy


    • Edited by Tracy'S Monday, August 31, 2015 11:35 PM
    Monday, August 31, 2015 11:34 PM