Display Template limitation of 50 items

Hi,
is there a way to get over the Display Template limitation of 50 items?
keren tsur

I found a workaround to this limitation and have blogged about it here: 
http://www.scottewing.net/Blog/Post/2/Getting-Around-the-Content-Search-Web-Part%27s-50-Results-Limit
It requires writing server-side code using reflection and deploying a farm solution, so if you don't have that option then you may be stuck.  There's also a client-side solution here but it doesn't work for anonymous access: 
http://sharepoint-community.net/forum/topics/how-to-override-content-by-search-web-part-s-limit-of-50-results
In most cases I'd agree that you shouldn't show more than 50 results on a page.  However, I believe there are almost always exceptions to every rule.  In my case, I needed to go over this limit because we were porting a WordPress site
over that had a page that needed this, and we needed it to behave the same way.
 - Scott

Similar Messages

  • CSWP Display Template Item - Include Like / Rating SharePoint control

    I'm working with the Content Search Web Part to bring details from Announcements lists up to the home page.  Each of these lists has the Like / Rating Social elements enabled and I would like to surface this on the Item Display Template but can't find
    out how.
    Is there a SharePoint control or JavaScript that I can use to surface this content?
    Thanks

    Ok, after searching I've found a solution for this.  It will be a 2 stage solution, the first simply displaying the rating or number of likes, the second actually updating them.
    So, stage 1:
    1.  You need to login to your Central Administration site and go to your Search Service Application.  Once there, under "Queries and Results", click "Search Schema".  You can apply a filter to help find the relevant managed property, so filter
    on "Like" or "Rating".  In this example I wanted to use the number of likes, so after filtering on "Like" I clicked to edit the "LikesCount" managed property.  From the edit page, located the "Main characteristics" heading and ensure that the "Searchable"
    checkbox is ticked.  Click "Ok" and run a "Full Crawl" on your content source.
    2.  Once this has been done, locate the Display Item Content Template that will be used for the Content Search Web Part.  At the top of this file you will find an <mso:ManagedPropertyMapping /> tag.  In this you want to register the
    LikesCount managed property from earlier.  This can be done by copying something similar to below:
    &#39;Likes Count&#39;{Likes Count}:&#39;LikesCount&#39;
    Further down the template, within the <div> where you can define content you need to setup a variable that reads the LikesCount value.  I also had some trouble reading this value when there were no Likes on an item, == null and isNaN() didn't
    seem to work so I added an if statement to check for 0 items.
    var likesCount = $getItemValue(ctx, "Likes Count");
    if (!(likesCount > 0)) {
        likesCount = 0;
    Finally, you can surface this variable into your content by simply using the normal notation.  i.e.
    _#= likesCount =#_
    I hope this has been of use to some people.  I will be posting an update once I've figured out if it's possible to like the source list item from the CSWP.

  • Custom display template - how to add anothe display template for refimement item?

    Custom display template - how to add anothe display template for refimement item?
    I add a new filter_default_custom.html file and want to create new refinement item display template to point to it
    keren tsur

    Not 100% if I understood the question, but if you uploaded your template to the Master Gallery and the corresponding .js file has been created, you can open the refinement config panel and specify the result type you want to map to your custom template.
    http://www.eliostruyf.com/part-1-create-first-search-refiner-control-template/
    Kind Regards
    Bjoern
    http://www.sharepointviking.com
    Twitter: Follow @bjoern_rapp

  • Item display templates office 365 not showing in sharepoint designer

    Hi,
    I have an enterprise search site in O365. I can brows to Masterpage > Display Templates > Search in the browser and see the .html & .js file.  If I brows to the same location in SharePoint designer, the files do not display.  How do I
    see/edit the files in SP designer?
    Thx!

    Hi Lorena,
    Add an image of the path, All Files (and pin button)->_catalogs->masterpage library.
    Thanks
    Daniel Yang
    TechNet Community Support

  • Excel File [.xlsx] of more than 5 MB - Not applying Excel Display Template

    Hi Team,
    We have an issue in SharePoint 2013 Search Results for Excel files having extension .xlsx format. Some files which are having more than 5 MB size are not applying Excel display template. Even we are not getting Excel icon beside the Search result of this
    item.
    For all other excel files like [All sizes of .xls format and files less than 5 MB of .xlsx format] Excel display template is applying.
    Can anyone help me on this. Do we have any issues/limitations on file size for Search Results.
    Thanks, Dinesh
    Dinesh Pulugundla, Microsoft Certified Technology Specialist.

    Hi Dinesh,
    Yes,SharePoint Search crawl component downloads metadata and content from a document until it reaches the maximum document size. For Excel documents, the maximum document size is 3MB. And you can change the limit for the maximum document size, but it does
    not affect Excel documents.
    Reference:
    http://technet.microsoft.com/en-us/library/cc262787(v=office.15).aspx#Search
    Thanks,
    Eric
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Eric Tao
    TechNet Community Support

  • How to create a Display template for people search results

    Hi,
    I've just installed Sharepoint 2013 and started to play around with it. Seems to be many improvements - among these are the ability to create Display templates.
    On my publishing page there is a default "employee lookup" app which returns prefferred name, title and department as default when I try to search.
    I would love to return mobile number aswell so I have tried to do the following:
    I made a copy of Display _Catalogs/Masterpages/Display Templates/Search/Item_Person.html
    Edited that one with the following:
    1. Added 'MobilePhone':'MobilePhone' to the "Managed Property mapping" in the top of the html   document:
    <mso:ManagedPropertyMapping msdt:dt="string">'AboutMe':'AboutMe','AccountName':'AccountName','BaseOfficeLocation':'BaseOfficeLocation','Department':'Department','HitHighlightedProperties':'HitHighlightedProperties','Interests':'Interests','JobTitle':'JobTitle','LastModifiedTime':'LastModifiedTime','Memberships':'Memberships','MobilePhone':'MobilePhone','PastProjects':'PastProjects','Path':'Path','PictureURL':'PictureURL','PreferredName':'PreferredName','Responsibilities':'Responsibilities','Schools':'Schools','ServiceApplicationID':'ServiceApplicationID','SipAddress':'SipAddress','Skills':'Skills','UserProfile_GUID':'UserProfile_GUID','WorkEmail':'WorkEmail','WorkId':'WorkId','YomiDisplayName':'YomiDisplayName'</mso:ManagedPropertyMapping>
    2. Set a var in the <body> with:
    var has_MobilePhone = !$isEmptyString(ctx.CurrentItem.MobilePhone);
    Created the following based on "DepartmentField":
    if(has_MobilePhone == true) {
    _#-->
    <div id="MobilephoneField">
    <!--#_
    var encodedMobilePhone = $htmlEncode(ctx.CurrentItem.MobilePhone);
    var displayMobilePhone = Srch.U.getSingleHHXMLNodeValue(hhProps, "MobilePhone");
    if ($isEmptyString(displayMobilePhone)) { displayMobilePhone = encodedMobilePhone}
    _#-->
    <div id="MobilePhoneValue" class="ms-srch-ellipsis" title="_#= encodedMobilePhone =#_"> _#= displayMobilePhone =#_ </div>
    </div>
    <!--#_
    Saved the document to the masterpage galary and edited the search result page to (people search core results webpart) to "use a single template to display items" and selected my display template.
    Now the search result is still working but I get no mobile numbers to show up in the user info (only in the details which is default).
    Anyone has some bright ideas of what i'm missing?. I'm not used to code (which might be the cause :-)). If you also have an idea on how to make the value of the number = Mobile: <mobilenumber>. So the "Mobile:" static text is displayed
    aswell.
    Thanks a lot for your time.

    Hello,
    I did the same with my new SharePoint 2013 (I would like to display the mobile phone too) but without any chance. Have you done anything else ?
    This is my User Property "CellPhone" :
    http://www.cladstrife.com/CellPhone_Prop.png
    The ManagedPropertyMapping :
    <mso:ManagedPropertyMapping msdt:dt="string">'AboutMe':'AboutMe','AccountName':'AccountName','BaseOfficeLocation':'BaseOfficeLocation','Department':'Department','HitHighlightedProperties':'HitHighlightedProperties','Interests':'Interests','JobTitle':'JobTitle','LastModifiedTime':'LastModifiedTime','Memberships':'Memberships','PastProjects':'PastProjects','Path':'Path','PictureURL':'PictureURL','PreferredName':'PreferredName','Responsibilities':'Responsibilities','Schools':'Schools','ServiceApplicationID':'ServiceApplicationID','SipAddress':'SipAddress','Skills':'Skills','UserProfile_GUID':'UserProfile_GUID','WorkEmail':'WorkEmail','WorkId':'WorkId','YomiDisplayName':'YomiDisplayName','CellPhone':'CellPhone','HomePhone':'HomePhone'</mso:ManagedPropertyMapping>
    The "if_exist" variable :
    var has_cphone = !$isEmptyString(ctx.CurrentItem.CellPhone);
    And the "display" code :
    <!--#_
    if(has_cphone == true) {
    _#-->
    <div id="CPhoneField">
    <!--#_
    var encodedCPhone = $htmlEncode(ctx.CurrentItem.CellPhone);
    var displayCPhone = Srch.U.getSingleHHXMLNodeValue(hhProps, "CellPhone");
    if ($isEmptyString(displayCPhone)) { displayCPhone = encodedCPhone}
    _#-->
    <div id="CPhoneValue" class="ms-srch-ellipsis" title="_#= encodedCPhone =#_"> Mobile: _#= displayCPhone =#_ </div>
    </div>
    <!--#_
    _#-->
    If I delete the test lines in the display code (if(has_cphone == true) it show "Mobile:" but without any mobile number.
    Thanks for your help if any idea :)
    Best regards
    Gabriel

  • Access query strings in a search results page with custom display template

    am trying to create a  custom display template in my search results page , so i went to download the itemdefault html file and renamed it and  saved as  different file.and  am started to updating.
    the issue i am facing here is : in my  search results page there are 2 query strings, which are passed by anotehr .net appln[ another asp.net appln will be sending the query string to my sp 2013 search results page]
    but, how can i  read these 2  query strings using jslink and  new token _#- ? 
             <!--#_
               var QStringResults= null;
    ctx.OnPostRender = [];
    ctx.OnPostRender.push(function(){ 
    QStringResults= getQuString(); //here am unable to read the QStringResults value 
     _#-->  
    the below is my cstomhtml file
    am unable to  get the values :
                   <a href="http://srvrname:2013/sites/CMP/_layouts/15/BIFAddInputRef/bifpage1.aspx?bif1=_#= $htmlEncode(QStringResults) =#_"> Add Input Reference </a>
    <html xmlns:mso="urn:schemas-microsoft-com:office:office" xmlns:msdt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882"> 
    <head>
    <title>Item BIF</title>
    <!--[if gte mso 9]><xml>
    <mso:CustomDocumentProperties>
    <mso:TemplateHidden msdt:dt="string">0</mso:TemplateHidden>
    <mso:MasterPageDescription msdt:dt="string">Displays the default result item template.</mso:MasterPageDescription>
    <mso:ContentTypeId msdt:dt="string">0x0101002039C03B61C64EC4A04F5361F385106603</mso:ContentTypeId>
    <mso:TargetControlType msdt:dt="string">;#SearchResults;#</mso:TargetControlType>
    <mso:HtmlDesignAssociated msdt:dt="string">1</mso:HtmlDesignAssociated>
    <mso:ManagedPropertyMapping msdt:dt="string">'Title':'Title','Path':'Path','Description':'Description','EditorOWSUSER':'EditorOWSUSER','LastModifiedTime':'LastModifiedTime','CollapsingStatus':'CollapsingStatus','DocId':'DocId','HitHighlightedSummary':'HitHighlightedSummary','HitHighlightedProperties':'HitHighlightedProperties','FileExtension':'FileExtension','ViewsLifeTime':'ViewsLifeTime','ParentLink':'ParentLink','FileType':'FileType','IsContainer':'IsContainer','SecondaryFileExtension':'SecondaryFileExtension','DisplayAuthor':'DisplayAuthor','CMPBIFURL2':'CMPBIFURL2'</mso:ManagedPropertyMapping>
    <mso:_dlc_DocId msdt:dt="string">X3CVW7PXYF6P-3-222</mso:_dlc_DocId>
    <mso:_dlc_DocIdItemGuid msdt:dt="string">3ed12157-ea19-4591-b9cd-7a826aef35dc</mso:_dlc_DocIdItemGuid>
    <mso:_dlc_DocIdUrl msdt:dt="string">http://srvrname:2013/sites/CMP/_layouts/15/DocIdRedir.aspx?ID=X3CVW7PXYF6P-3-222, X3CVW7PXYF6P-3-222</mso:_dlc_DocIdUrl>
    </mso:CustomDocumentProperties>
    </xml><![endif]-->
    </head>
    <body>
        <script>
            $includeLanguageScript(this.url,"~sitecollection/_catalogs/masterpage/Display Templates/Search/BIFJScript.js");
        </script>
        <div id="Item_BIF2">
    <!--#_ 
            if(!$isNull(ctx.CurrentItem) && !$isNull(ctx.ClientControl)){
                var id = ctx.ClientControl.get_nextUniqueId();
                var itemId = id + Srch.U.Ids.item;
    var hoverId = id + Srch.U.Ids.hover;
    var hoverUrl = "~sitecollection/_catalogs/masterpage/Display Templates/Search/Item_Default_HoverPanel.js";
                $setResultItem(itemId, ctx.CurrentItem);
    if(ctx.CurrentItem.IsContainer){
    ctx.CurrentItem.csr_Icon = Srch.U.getFolderIconUrl();
    ctx.currentItem_ShowHoverPanelCallback = Srch.U.getShowHoverPanelCallback(itemId, hoverId, hoverUrl);
                ctx.currentItem_HideHoverPanelCallback = Srch.U.getHideHoverPanelCallback();
    _#-->
             <!--#_
               var QStringResults= null;
    ctx.OnPostRender = [];
    ctx.OnPostRender.push(function(){ 
    QStringResults= getQuString();
     _#-->  
            <div id="_#= $htmlEncode(QStringResults) =#_" name="bifItemqstring" 
                    data-displaytemplate="DefaultItem" class="ms-srch-item" 
                    >
                    <h5 style="color:ghostwhite;background-color:black">
                        <a href="_#= ctx.CurrentItem.Path =#_"> _#= ctx.CurrentItem.Path =#_</a>
                    </h5>
                </div>
                <div id="_#= $htmlEncode(itemId) =#_" name="bifItem" 
                    data-displaytemplate="DefaultItem" class="ms-srch-item" 
                    onmouseover="_#= ctx.currentItem_ShowHoverPanelCallback =#_" 
                    onmouseout="_#= ctx.currentItem_HideHoverPanelCallback =#_">
                    <h1 style="color:ghostwhite;background-color:black">
                        <a href="_#= ctx.CurrentItem.Path =#_"> _#= ctx.CurrentItem.Path =#_</a>
                    </h1>
                    <h4 style="color:ghostwhite;background-color:black">
                        <a href="_#= ctx.CurrentItem.Description =#_"> _#= ctx.CurrentItem.Description =#_</a>
                    </h4>
                    <h4 style="color:ghostwhite;background-color:black">
                        <a href="_#= ctx.CurrentItem.LastModifiedTime =#_"> _#= ctx.CurrentItem.LastModifiedTime =#_</a>
                    </h4>
                    <h3 style="color:floralwhite;background-color:green">
                        var mybifurl1= document.getElementById($htmlEncode(QStringResults));
                    <a href="http://srvrname:2013/sites/CMP/_layouts/15/BIFAddInputRef/bifpage1.aspx?bif1=_#= $htmlEncode(QStringResults) =#_"> Add Input Reference </a>
                    </h3>
                  </div>
            <div>
            </div>
                    <div id="_#= $htmlEncode(hoverId) =#_" class="ms-srch-hover-outerContainer"></div>
    <!--#_ 
    _#-->
        </div>
    </body>
    </html>
    when i run the page , i a getting the query string value as   undefined! though the custom javascript is getting called.

    i am able to get the  results  by implementing the below:
    <h4 style="background-color:black">
                        <a onclick="javascript:mycalltojs(_#=
    ctx.CurrentItem.Path=#_) > click here </a>
                    </h4>
    hope this helps  anyone

  • Sharepoint Online - Content Search, some Display Templates missing.

    I'm experimenting Content Search web parts in a number of Site Collections, but appear to be getting different Display Templates available.
    Can anyone explain what controls the availability of the templates please...
    Our Default root site collection.
    http://company.sharepoint.com
    Has Web part controls of
    List & Slideshow
    And Item Templates of
    Large Picture, Picture on left 3 lines, Recommended Items & Video
    All other site collections  http://company.sharepoint.com/sites/Dept1
    Has Web part controls of List
    & Slideshow
    PLUS List with Paging
    And Item Templates of
    Large Picture, Picture on left 3 lines, Recommended Items & Video
    PLUS Diagnostic, Picture on Top 3 Lines bottom, & Two Lines
    I've compared site and collection features and cannot see any features that would appear to control this...
    Any ideas.... Please!
    Cheers
    Russ

    I just had the same issue, I think it was something with broken upgrade code from 2013.
    Anyways, I solved it:
    Go to Master Page Gallery --> Display Templates --> Content Web Parts
    Delete all JavaScript Files in there except the Group_Content.js (!!!), they seem to have messed up metadata (Content Type Reference and Template Level)
    Open up PowerShell and issue this command:
    Get-SPFeature SearchTemplatesandResources | Enable-SPFeature -Url [URLtoBrokenSite] -Force
    This will re-upload the JavaScript files and all controls and templates finally are there again, hopefully ;)
    // Tried and true method for weather forecasting - random numbers. String weather = (new Random()).Next(2)==0?"rainy":"sunny";

  • Search Results Clear On Refinement with custom Display Template

    I am working with a custom search display template. I did minor presentation changes in the template. I am showing a checkbox against each search item and there is some logic behind it.
    For this I am using Item_Default Template.
    ctx.OnPostRender = [];
    ctx.OnPostRender.push(function(){
    $('input[name=checkbox]').change(function(){
    //My Logic
    With this is in place, on page load it shows initial results just fine and my checkbox logic also works fine.
    However, whenever user hits a refinement value the results clear out and no longer display. I know the results are there because when I do reload of the page refined results appears but again when you click on refinement value results disappear.
    With some digging on the forums I found that use "AddPostRenderCallback(ctx,function(){" instead of "ctx.OnPostRender.push", I tried this as well but it didn't help.
    Whenever I remove "ctx.OnPostRender.push(function(){" code from my template, refinement panel starts working properly again. So there has to be something related to this "ctx.OnPostRender.push". I cant just
    remove it because I have to write my JS logic as well for that this function is must.
    Please give me some pointers.
    Thanks
    Sarvesh
    Regards Sarvesh Shinde SharePoint Developer, India

    i am able to get the  results  by implementing the below:
    <h4 style="background-color:black">
                        <a onclick="javascript:mycalltojs(_#=
    ctx.CurrentItem.Path=#_) > click here </a>
                    </h4>
    hope this helps  anyone

  • Custom display template for search

    HI 
    I have Created a custom Item Template as shown below.I want to map this with my custom result type but it is not working
    <html xmlns:mso="urn:schemas-microsoft-com:office:office" xmlns:msdt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882">
    <head>
    <title>News Item</title>
    <!--[if gte mso 9]><xml>
    <mso:CustomDocumentProperties>
    <mso:TemplateHidden msdt:dt="string">0</mso:TemplateHidden>
    <mso:MasterPageDescription msdt:dt="string">$Resources:Microsoft.Office.Server.Search,DisplayTemplateDescription_SearchDefaultItem</mso:MasterPageDescription>
    <mso:ContentTypeId msdt:dt="string">0x0101002039C03B61C64EC4A04F5361F385106603</mso:ContentTypeId>
    <mso:TargetControlType msdt:dt="string">;#SearchResults;#</mso:TargetControlType>
    <mso:HtmlDesignAssociated msdt:dt="string">1</mso:HtmlDesignAssociated>
    <mso:ManagedPropertyMapping msdt:dt="string">'Title':'Title','Path':'Path','Description':'Description','EditorOWSUSER':'EditorOWSUSER','LastModifiedTime':'LastModifiedTime','CollapsingStatus':'CollapsingStatus','DocId':'DocId','HitHighlightedSummary':'HitHighlightedSummary','HitHighlightedProperties':'HitHighlightedProperties','FileExtension':'FileExtension','ViewsLifeTime':'ViewsLifeTime','ParentLink':'ParentLink','FileType':'FileType','IsContainer':'IsContainer','SecondaryFileExtension':'SecondaryFileExtension','SEDWMPNewsPublishDate':'SEDWMPNewsPublishDate','DisplayAuthor':'DisplayAuthor1','SiteTitle':'SiteTitle'</mso:ManagedPropertyMapping>
    <mso:HtmlDesignConversionSucceeded msdt:dt="string">True</mso:HtmlDesignConversionSucceeded>
    <mso:CrawlerXSLFile msdt:dt="string"></mso:CrawlerXSLFile>
    <mso:HtmlDesignPreviewUrl msdt:dt="string"></mso:HtmlDesignPreviewUrl>
    </mso:CustomDocumentProperties>
    </xml><![endif]-->
    </head>
    <body>
    <div id="StoraEnso_Item_Default">
    <!--#_
    if(!$isNull(ctx.CurrentItem) && !$isNull(ctx.ClientControl)){
    var id = ctx.ClientControl.get_nextUniqueId();
    var itemId = id + Srch.U.Ids.item;
    var hoverId = id + Srch.U.Ids.hover;
    var hoverUrl = "~sitecollection/_catalogs/masterpage/Display Templates/Search/Item_Default_HoverPanel.js";
    $setResultItem(itemId, ctx.CurrentItem);
    if(ctx.CurrentItem.IsContainer){
    ctx.CurrentItem.csr_Icon = Srch.U.getFolderIconUrl();
    ctx.currentItem_ShowHoverPanelCallback = Srch.U.getShowHoverPanelCallback(itemId, hoverId, hoverUrl);
    ctx.currentItem_HideHoverPanelCallback = Srch.U.getHideHoverPanelCallback();
    _#-->
    <div id="_#= $htmlEncode(itemId) =#_" name="SEItem" data-displaytemplate="StoraEnsoDefaultItem" class="ms-srch-item" onmouseover="_#= ctx.currentItem_ShowHoverPanelCallback =#_" onmouseout="_#= ctx.currentItem_HideHoverPanelCallback =#_">
    <h2 class="heading"><a href="_#= ctx.CurrentItem.Path =#_">_#= ctx.CurrentItem.Title =#_</a></h2>
    <div id="_#= $htmlEncode(hoverId) =#_" class="ms-srch-hover-outerContainer"></div>
    <p>_#= Srch.U.processHHXML(ctx.CurrentItem.HitHighlightedSummary) =#_</p>
    <div class="footer">
    <dl class="desc">
    <dt>SiteTitle</dt> _#= ctx.CurrentItem.SEDWMPNewsPublishDate =#_
    <dd><a class="status" href="#">_#= ctx.CurrentItem.SiteTitle =#_</a></dd>
    <dt>Author</dt>
    <dd><a class="status" href="#">_#= ctx.CurrentItem.DisplayAuthor =#_</a></dd>
    </dl>
    </div>
    </div>
    <!--#_
    _#-->
    </div>
    </body>
    </html>
    If you see in "managedPropertyMapping" I have added a new property "SEDWMPNewsPublishDate" and when I use in my html I am not getting the value.
    I checked with fiddler and I found that This property is not getting mapped. Json object does return this property.However  this property has value. I have tested with content search webpart nad my code also.it returns value.
    Can anyone let me know is there any issue in the above rendering template code 
    On update to this, I was using resultscript webpart on the page to display data and I have created custom result type to modify the display.What I found that when I add the custom properties which I need, on result script webpart  using as
    follows 
     scriptWebPart.SelectedPropertiesJson = "[\"SEDWMPNewsPublishDate\",\"SEDWMPIntroduction\"]"
    and save the changes then I start getting the value of my custom properties.
    I don't know how the result type works in accordance with display templates and when does it gets applied on the search data.If anyone is aware please let me know.
    If I can't use the display templates with custom properties then what is the use of ManagedPropertyMapping on display templates.Can anyone please make me understand?

    You need to update the js file also.You can upload the js file also.In js file you have a column "ManagedPropertyMapping" this denotes which managed property should come for item in search.
    For uploading the js file you can use as follows under module
     <File Path="ModSearchDisplayTemplates\x.js" Url="x.js" Type="GhostableInLibrary">
          <Property Name="Title" Value="xjs" />
          <Property Name="MasterPageDescription" Value="$Resources:Microsoft.Office.Server.Search,DisplayTemplateDescription_SearchDefaultItem" />
          <Property Name="ContentType" Value="$Resources:TemplateContentType_Code_Name" />
          <Property Name="DisplayTemplateLevel" Value="Item" />
          <Property Name="TemplateHidden" Value="0" />
          <Property Name="TargetControlType" Value=";#SearchResults;#" />
          <Property Name="HtmlDesignLockedFile" Value="TRUE" />
          <Property Name="ManagedPropertyMapping" Value="'Title':'Title','Path':'Path','Description':'Description','EditorOWSUSER':'EditorOWSUSER','LastModifiedTime':'LastModifiedTime','CollapsingStatus':'CollapsingStatus','DocId':'DocId','FileExtension':'FileExtension','ParentLink':'ParentLink','FileType':'FileType','IsContainer':'IsContainer','SEDWMPNewsPublishDate00':'SEDWMPNewsPublishDate00','SEDWMPIntroduction':'SEDWMPIntroduction','SEDWMPNewsIsSticky':'SEDWMPNewsIsSticky','SEDWMPNewsPostThreadId':'SEDWMPNewsPostThreadId'"/>
        </File>

  • Sharepoint 2013 custom search results grouping display template

    Hi,
    I am trying to implement custom grouping for search result items. I would like to group them by a managed property, but without using result blocks (query rules). The idea is to sort the results by the property and then compare the current item (ctx.CurrentItem)
    with the previous item using ctx.CurrentItem.ParentTableReference. If a new property value is detected we insert a new 'group header' (just some simple html). The problem is the ParentTableReference is undefined. Shouldn't there be such a property in current
    item object?
    I'm implementing this in a custom search result item display template...
    Thanks in advance.

    Hi,
    According to your post, my understanding is that you want to customize search result items display template.
    I suggest you get enumerate all properties of JavaScript context object and debug you code to watch the
    ctx.CurrentItem object.
    The following articles for your reference:
    Debugging Display Templates in SharePoint 2013 Search
    http://powersearching.wordpress.com/2013/01/25/debugging-display-temlates-in-sharepoint-2013-search/
    Enumerate all properties of JavaScript context object in display templates in SharePoint 2013
    http://sadomovalex.blogspot.co.uk/2013/06/enumerate-all-properties-of-javascript.html
    How to Define a Custom Group Display Template (GroupTemplateId) for the Search Results WebPart via JavaScript
    http://www.eliostruyf.com/how-to-define-a-custom-group-display-template-for-the-search-results-webpart-via-javascript/
    Creating customized search results in SharePoint 2013
    http://www.abelsolutions.com/totm/creating-customized-search-results-in-sharepoint-2013/
    Best Regards
    Dennis Guo
    TechNet Community Support

  • Customizng SharePoint 2013 Display Template

    hi i am trying to customize Item_Picture3Lines.html and result not appear Note i am using content search web part and change query to specific content type it returns result but my display template does not render data i am trying to add Line 4 but no
    result appear My Code Sample :-
    <html xmlns:mso="urn:schemas-microsoft-com:office:office" xmlns:msdt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882">
    <head>
    <title>Display Template</title>
    <!--[if gte mso 9]><xml>
    <mso:CustomDocumentProperties>
    <mso:TemplateHidden msdt:dt="string">0</mso:TemplateHidden>
    <mso:ManagedPropertyMapping msdt:dt="string">
    'Picture URL'{Picture URL}:'PublishingImage;PictureURL;PictureThumbnailURL',
    'Link URL'{Link URL}:'Path',
    'Line 1'{Line 1}:'Title',
    'Line 2'{Line 2}:'Description',
    'Line 3'{Line 3}:'',
    'Line 4'{Line 4}:'',
    'SecondaryFileExtension',
    'ContentTypeId'
    </mso:ManagedPropertyMapping>
    <mso:MasterPageDescription msdt:dt="string">This Item Display Template will show a 100x100 picture of the item on the left. The title and the default item description will display to the right of the picture with an additional line that is available for a custom managed property.</mso:MasterPageDescription>
    <mso:ContentTypeId msdt:dt="string">0x0101002039C03B61C64EC4A04F5361F385106603</mso:ContentTypeId>
    <mso:TargetControlType msdt:dt="string">;#Content Web Parts;#</mso:TargetControlType>
    <mso:HtmlDesignAssociated msdt:dt="string">1</mso:HtmlDesignAssociated>
    <mso:HtmlDesignStatusAndPreview msdt:dt="string">http://c1-dev02/sites/ContentSearchWebPart/_catalogs/masterpage/Display Templates/Content Web Parts/Item_Picture3Lines - Copy.html, Conversion successful.</mso:HtmlDesignStatusAndPreview>
    <mso:HtmlDesignConversionSucceeded msdt:dt="string">True</mso:HtmlDesignConversionSucceeded>
    </mso:CustomDocumentProperties>
    </xml><![endif]-->
    </head>
    <body>
    <!--
    Warning: Do not try to add HTML to this section. Only the contents of the first <div>
    inside the <body> tag will be used while executing Display Template code. Any HTML that
    you add to this section will NOT become part of your Display Template.
    -->
    <script>
    $includeLanguageScript(this.url, "~sitecollection/_catalogs/masterpage/Display Templates/Language Files/{Locale}/CustomStrings.js");
    </script>
    <!--
    Use the div below to author your Display Template. Here are some things to keep in mind:
    * Surround any JavaScript logic as shown below using a "pound underscore" (#_ ... _#) token
    inside a comment.
    * Use the values assigned to your variables using an "underscore pound equals"
    (_#= ... =#_) token.
    -->
    <div id="Item_Picture3Lines - Copy">
    <!--#_
    var encodedId = $htmlEncode(ctx.ClientControl.get_nextUniqueId() + "_picture3Lines_");
    var linkURL = $getItemValue(ctx, "Link URL");
    linkURL.overrideValueRenderer($urlHtmlEncode);
    var line1 = $getItemValue(ctx, "Line 1");
    var line2 = $getItemValue(ctx, "Line 2");
    var line3 = $getItemValue(ctx, "Line 3");
    var line4 = $getItemValue(ctx, "Line 4");
    var pictureURL = $getItemValue(ctx, "Picture URL");
    var pictureId = encodedId + "picture";
    var pictureMarkup = Srch.ContentBySearch.getPictureMarkup(pictureURL, 100, 100, ctx.CurrentItem, "cbs-picture3LinesImg", line1, pictureId);
    line1.overrideValueRenderer($contentLineText);
    line2.overrideValueRenderer($contentLineText);
    line3.overrideValueRenderer($contentLineText);
    var containerId = encodedId + "container";
    var pictureLinkId = encodedId + "pictureLink";
    var pictureContainerId = encodedId + "pictureContainer";
    var dataContainerId = encodedId + "dataContainer";
    var line1LinkId = encodedId + "line1Link";
    var line1Id = encodedId + "line1";
    var line2Id = encodedId + "line2";
    var line3Id = encodedId + "line3";
    var line4Id = encodedId + "line4";
    var dataDisplayTemplateTitle = "ItemPicture3Lines";
    _#-->
    <div class="cbs-picture3LinesContainer" id="_#= containerId =#_" data-displaytemplate="_#= $htmlEncode(dataDisplayTemplateTitle) =#_">
    <div class="cbs-picture3LinesImageContainer" id="_#= pictureContainerId =#_">
    <!--#_
    if(!linkURL.isEmpty)
    _#-->
    <a class="cbs-pictureImgLink" href="_#= linkURL =#_" title="_#= $htmlEncode(line1.defaultValueRenderer(line1)) =#_" id="_#= pictureLinkId =#_"
    >
    <!--#_
    _#-->
    _#= pictureMarkup =#_
    <!--#_
    if(!linkURL.isEmpty)
    _#-->
    </a>
    <!--#_
    _#-->
    </div>
    <div class="cbs-picture3LinesDataContainer" id="_#= dataContainerId =#_">
    <a class="cbs-picture3LinesLine1Link" href="_#= linkURL =#_" title="_#= $htmlEncode(line1.defaultValueRenderer(line1)) =#_" id="_#= line1LinkId =#_"
    >
    <h2 class="cbs-picture3LinesLine1 ms-accentText2 ms-noWrap" id="_#= line1Id =#_"> _#= line1 =#_</h2>
    </a>
    <!--#_
    if(!line2.isEmpty)
    _#-->
    <div class="cbs-picture3LinesLine2 ms-noWrap" title="_#= $htmlEncode(line2.defaultValueRenderer(line2)) =#_" id="_#= line2Id =#_" > _#= line2 =#_</div>
    <!--#_
    if(!line3.isEmpty)
    _#-->
    <div class="cbs-pictureLine3 ms-textSmall ms-noWrap" id="_#= line3Id =#_" title="_#= $htmlEncode(line3.defaultValueRenderer(line3)) =#_">_#= line3 =#_</div>
    <!--#_
    if(!line4.isEmpty)
    _#-->
    <div class="cbs-pictureLine3 ms-textSmall ms-noWrap" id="_#= line4Id =#_" title="_#= $htmlEncode(line4.defaultValueRenderer(line4)) =#_">_#= line4 =#_</div>
    <!--#_
    _#-->
    </div>
    </div>
    </div>
    </body>
    </html>

    Was looking for something else and stumbled across this... I'm sure you've sorted this out by now, but the problem, i think is that you're not specifying a data source (list/site column) for the Line 4 data field...or line 3 for that matter... See lines
    14 and 15 in your code sample. There should be a field reference between the ' '.

  • Group display templates

    Hi all
    I am implementing a search-driven carousel in SharePoint Online 2013 Preview like this one: http://www.blendmaster.net/blog/2012/11/search-driven-twitter-bootstrap-carousel-in-sharepoint-2013/.
    Unlike that one, I am implementing it using the Search Results web part, not the Content Search web part, because the latter one isn't available in SharePoint Online 2013 Preview.
    It is working, however, as well as customising the control and item display templates, I am wanting to customise the group display template; however, I can't find how to "register" the group display template.
    Does anyone know how to associate a group display template with a control display template or, alternatively, how to associate the group display template with the Search Results web part?
    Regards,
    Chris

    Are group templates even available in the CSWP Display templates? It seems I saw on this blog a reference of OOTB templates and only saw a group template for the Search Results Web Part. I have read other posts where you could actually inject a group template
    into the CSWP. Even with that I do not see any examples of how to build the query rule and result block so that you can group results using the CSWP.
    Am I barking up the wrong tree with trying to roll-up content using the CSWP? It seems that everyone wants to group their results like they did using the CQWP but this seems to be very difficult or not well documented. I, for one, have been struggling with
    this for weeks without any success. This should not be so difficult.
    If we don't use the CSWP for content roll-up then what are my other options for cross site-collection roll-ups?

  • Edit Display Templates missing controls

    Hi,
    I'm having problems working with Search Display Templates on SharePoint Online. It started when I uploaded and published two new templates. When I edit the properties of a Search Results Web Part to use these templates, they are not appearing in the Display
    Templates dropdowns (Results Control Display Template and Item Display Template).
    Going to the Design Manager: Edit Display Templates page, there are no controls displayed at the top to enable me to manage the Display Templates. On other sites there are 'New, Upload, Actions and Settings' actions available.
    I'm suspicious that the two issues are linked. I've compared features on the site collection that works and the one that doesn't - both on the same tenancy - and they both have the same features enabled at a site collection and site level. I also have
    the same permission level on both sites.
    Does anyone know what I'm doing wrong?
    Many thanks,
    Colin
    Best wishes, Colin

    Hi Colin,
    Please go to Design Manager->Edit Display Templates page, and check whether the
    Approval Status of the two all are Approved. If not, please click the ECB menu->Publish a Major Version to  publish them.
    Like the screenshot:
    Best Regards,
    Wendy
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Wendy Li
    TechNet Community Support

  • Display Template - Assistant PreferredName

    Hi
    I need to customize the people search results hover panel to display the Assistant preferred name. 
    I've already got a custom display template for people item and hover panel in place. I'm currently getting back the assistant using the ManagedPropertyMapping using 'Assistant':['Assistant'] and this displays the assistants' login id domain\username. I'm
    assuming this is correct, as this is what would be stored against the user profile assistant property.
    I need to now display the assistants' PreferredName instead and I'm not sure how to proceed. I'm assuming I need to re-query the people manager to get back the preferred name.
    I can get the preferred name using the api: 
    schema://server/_api/SP.UserProfiles.PeopleManager/GetUserProfilePropertyFor(accountName=@v,propertyName='PreferredName')?@v='domain\username'
    I'm looking for best practice approach to complete this in the display template hover panel.
    Any pointers, guidance or information would be greatly appreciated.
    Kind regard,
    Lee

    Hi,
    According to your post, my understanding is that you wanted to add the PreferredName managed property in the custom people search hover panel.
    To add fields in people search hovel panel, we should modify the Item_Person.html and Item_Person_HovelPanel.html.
    It means, you should modify two place, your custom Item_Person.html page, and Item_Person_HovelPanel.html page.
    Then we should first add the fields in the Item_Person.html. In the ManagedPropertyMapping tag, use the following syntax to add the custom managed properties that you want to display: 
    '<Current item property name>':<Managed property name>'
    Then add your  properties in the Item_Person_HoverPanel.html like below(I use the MobilePhone managed property).
    <div style="color:#000000; display:inline">Mobile Phone:</div>_#=ctx.CurrentItem.MobilePhone=#_<br>
    More reference:http://blogs.technet.com/b/tothesharepoint/archive/2013/09/17/how-to-display-values-from-custom-managed-properties-in-the-hover-panel-in-sharepoint-server-2013.aspx
    Thanks,
    Jason
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Jason Guo
    TechNet Community Support

Maybe you are looking for

  • Text in purchased book disappeared after update

    I just updated my iPad to 5.1.1 and iBooks to 2.1.1.  After updating and synching to my iMac, I opened a book that I had purchased one month ago and had been reading.  All the text had disappeared.  I had nothing but blank pages except for the title

  • Oracle reading binary files from other oracle home.

    Hi all, I have two oracle db installed on the same server but on different oracle home. It seems to me that the second oracle is reading the binaries from the other installation. I can start this database and the sap instance and it starts on the cor

  • Have new 8.1 with adobe reader installed would like Pdf reader from firefox ..how do I get it

    I have a new 8.1 computer and adobe reader was installed on it ... Would prefer to use only Firefox PDF if can do so, for e-bay and photo taking use What steps do I take to delete Adobe Reader (if don't need it) and then to install PDF from firefox?

  • Error when running example

    I am getting an error when running an example from my lesson. I have verified that the classpath variable is properly set. C:\Documents and Settings\mpsmith\My Documents\java\class>java NoBreak Exception in thread "main" java.lang.NoClassDefFoundErro

  • How to fix r6034 error application(itunes) load of visual c++ runtime library incorrect

    I received a R6034 error which states application attempted load of microsoft visual c++ run time library incorrectly while updating itunes application. I have uninstalled itunes and attempted to reinstall it several times but each time I get the sam