Managed properties in display templates

Hi
I'm trying to include some custom managed properties (GlossaryProductString) into my custom display template but the ct.CurrentItem.GlossaryProductString is always undefined.
What I did:
 Create managed property and mark it as retrievable
Full crawl (I'm able to find results when using GlossaryProductString:"some content" as query)
Downloaded the item_default.html and renamed it
Added GlossaryProdcutString to the ManagedPropertyMapping properties ('GlossaryProductString':'GlossaryProductString')
Add the content to the template:
<p>Product: <span style="font-weight: 200">_#= ctx.CurrentItem.GlossaryProductString =#_</span></p>
all other stuff that is needed that the display template is used
The display template shows up for the results but the GlossaryProductString is always empty (undefined in JS object)
Any ideas?
Thanks for help.

Hi
The REST call returns the GlossaryProductString. Here an excerpt of the result:
- <d:element m:type="SP.SimpleDataRow">
- <d:Cells>
- <d:element m:type="SP.KeyValue">
<d:Key>Rank</d:Key>
<d:Value>11.5733613967896</d:Value>
<d:ValueType>Edm.Double</d:ValueType>
</d:element>
- <d:element m:type="SP.KeyValue">
<d:Key>DocId</d:Key>
<d:Value>725</d:Value>
<d:ValueType>Edm.Int64</d:ValueType>
</d:element>
- <d:element m:type="SP.KeyValue">
<d:Key>Title</d:Key>
<d:Value>Argument</d:Value>
<d:ValueType>Edm.String</d:ValueType>
</d:element>
- <d:element m:type="SP.KeyValue">
<d:Key>Path</d:Key>
<d:Value>https://sst-s13.ioztest.ch/glossary/Lists/Definitions/DispForm.aspx?ID=8</d:Value>
<d:ValueType>Edm.String</d:ValueType>
</d:element>
- <d:element m:type="SP.KeyValue">
<d:Key>GlossaryProductString</d:Key>
<d:Value>Excel</d:Value>
<d:ValueType>Edm.String</d:ValueType>
</d:element>
- <d:element m:type="SP.KeyValue">
<d:Key>OriginalPath</d:Key>
<d:Value>https://sst-s13.ioztest.ch/glossary/Lists/Definitions/DispForm.aspx?ID=8</d:Value>
<d:ValueType>Edm.String</d:ValueType>

Similar Messages

  • Display Error: The display template had an error. You can correct it by fixing the template or by changing the display template used in either the Web Part properties or Result Types. $(...).slick is not a function (OnPostRender: )

    Hi Team,
    I implemented news carousel using display template concepts.
    Its working.
    But some times it shows like some thing went wrong
    when clicke on show details
    it showing the error like
    Display Error: The display template had an error. You can correct it by fixing the template or by changing the display template used in either the Web Part properties or Result Types.
    $(...).slick is not a function (OnPostRender: )
    some times showing result and while refreshing the page am getting the error like below
    How to fix the issue
    Regards,
    Dhayanand

    Hi Wendy Li,
    Finally we fixed.
    The prob is that we referring two different version of jquery files in master page and page layout.
    We corrected by referring same version of jquery files in both pages
    Regards,
    Dhayanand

  • Error in Search results - Sorry, something went wrong. Display template had an error

    I'm receiving this error in custom search results page in our SharePoint 2013 Enterprise farm:
    Sorry, something went wrong.
    Display Error: The display template had an error. You can correct it by fixing the template or by changing the display template used in either the Web Part properties or Result Types.
    'console' is undefined (CoreRender: ~ sitecollection/_catalogs/masterpage/Display Templates/Search/Item_mycustom_Site.js
    I believe a similar error was resolved by March 2013 CU but our farm us running Aug 2013 CU. I have also tried adding domain to trusted zone in IE but still the same error.
    I do not get this error in Google Chrome or in IE 10 or above. Not sure if it is an issue with my display template because error disappears when upgrading IE to 10 or 11.
    Update: In IE 8 I can see search results with no error if the developer toolbar (F12) is enabled!
    -- The opinions expressed here represent my own and not those of anybody else -- http://manojvnair.blogspot.com

    Hi ,
    Did you try these steps
    Open up the SharePoint 2013 Management Shell as Administrator
    and run the following command:   Enable-SPFeature SearchWebParts -url http://<central admin
    url>
    Use a browser on a different machine, or add you SharePoint
    site(s) to the ‘Trusted Sites’ in IE.
    Activate the feature : “My
    Site Host“. This is a hidden feature scoped at the Site Collection level. The feature ID is 49571CD1-B6A1-43a3-BF75-955ACC79C8D8.
    The feature folder under SharePointRoot is MySiteHost.
    Install the update: http://www.microsoft.com/en-in/download/details.aspx?id=36989
    Here are some similar threads for you to take a look at:
    http://sharepoint.stackexchange.com/questions/70452/query-builder-for-result-source-not-working-in-central-admin
    http://www.thesharepointbaker.co.uk/sharepoint-2013-gotchas-2/
    http://bernado-nguyen-hoan.com/page/2/
    Ref:
    http://social.technet.microsoft.com/Forums/sharepoint/en-US/6e86cf3f-8001-4d13-a700-9e70d8828f03/controlsearchboxjs-not-found?forum=sharepointsearch

  • 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>

  • How to display the Author's Photo in a Display Template

    I am creating a custom display template that will show the date and contents of a blog post on the right, with a thumbnail of the author on the left. I cannot figure out how to retrieve the URL for the users photo from the display template.
    My first thought was that maybe there was a Managed Property I could choose in the property mappings. The Author Property will give me the Last Name, FirstName of the author. There is also a AuthorOWSUSER, which I thought might be an object with properties
    I could reference, like .FirstName, .Picture, etc. But this doesn't appear to work.
    My guess is that I have to do some scripting in the display template itself, but I just don't know where to find any references on this.

    Hi,
    I have done this in a Project before mounth. Create a Blog Post Site an attach with Visual Studio. There is a lib
    sp.ui.blogs.debug.js.
    When you load a Blog with comments, you can put a breakpoint and step Through.
    There is a Function, that renders the Photo from the Author Field.
    Hier is my code:
    function renderAuthor(ctx, $p1) {
    var $v_0 = SP.ScriptHelpers.getFieldFromSchema(ctx.ListSchema, 'Author');
    if (!SP.ScriptHelpers.isNullOrUndefined($v_0)) {
    var $v_1 = $v_0.WithPictureDetail;
    var $v_2 = $v_0.PictureOnly;
    $v_0.DefaultRender = 0;
    $v_0.WithPictureDetail = 0;
    $v_0.PictureOnly = 1;
    $v_0.PictureSize = 'Size_48px';
    $p1.write(spMgr.RenderFieldByName(ctx, 'Author', ctx.CurrentItem, ctx.ListSchema));
    $v_0.WithPictureDetail = $v_1;
    $v_0.PictureOnly = $v_2;
    It is very important that your Content Type Field has the Attribute ShowField="NameWithPictureAndDetails"
    Then you dont need to query UserProfile for Pictures, the info will be in the Fiedl.
    Chears
    Martin

  • 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

  • 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

  • SharePoint 2013 Search Display Template People Search Mobile Phone

    Hello,
    I'd like to customize the people search result page. I already added some custom profile properties without any problem. But, when adding the MobilePhone field nothing is display.
    I've created a new display template based on the "Item_Person.html" file. 
    Added the "MobilePhone" field in the ManagedPropertyMapping section
    <mso:ManagedPropertyMapping msdt:dt="string">&#39;WorkPhone&#39;:&#39;WorkPhone&#39;,&#39;MobilePhone&#39;:&#39;MobilePhone&#39;,&#39;Room&#39;:&#39;Room&#39;,&#39;Werkgebieden&#39;:&#39;Werkgebieden&#39;,&#39;AboutMe&#39;:&#39;AboutMe&#39;,&#39;AccountName&#39;:&#39;AccountName&#39;,&#39;BaseOfficeLocation&#39;:&#39;BaseOfficeLocation&#39;,&#39;Department&#39;:&#39;Department&#39;,&#39;HitHighlightedProperties&#39;:&#39;HitHighlightedProperties&#39;,&#39;Interests&#39;:&#39;Interests&#39;,&#39;JobTitle&#39;:&#39;JobTitle&#39;,&#39;LastModifiedTime&#39;:&#39;LastModifiedTime&#39;,&#39;Memberships&#39;:&#39;Memberships&#39;,&#39;PastProjects&#39;:&#39;PastProjects&#39;,&#39;Path&#39;:&#39;Path&#39;,&#39;PictureURL&#39;:&#39;PictureURL&#39;,&#39;PreferredName&#39;:&#39;PreferredName&#39;,&#39;Responsibilities&#39;:&#39;Responsibilities&#39;,&#39;Schools&#39;:&#39;Schools&#39;,&#39;ServiceApplicationID&#39;:&#39;ServiceApplicationID&#39;,&#39;SipAddress&#39;:&#39;SipAddress&#39;,&#39;Skills&#39;:&#39;Skills&#39;,&#39;UserProfile_GUID&#39;:&#39;UserProfile_GUID&#39;,&#39;WorkEmail&#39;:&#39;WorkEmail&#39;,&#39;WorkId&#39;:&#39;WorkId&#39;,&#39;YomiDisplayName&#39;:&#39;YomiDisplayName&#39;</mso:ManagedPropertyMapping>
    3. Added a variable:
    var has_MobilePhone = !$isEmptyString(ctx.CurrentItem.MobilePhone)
    4. Copied the "WorkPhone" display section and changed the values to MobilePhone
    <!--#_
    if(has_MobilePhone == true) {
    _#-->
    <div id="MobilePhoneField">
    <!--#_
    var encodedMobilePhone = ctx.CurrentItem.MobilePhone;
    var displayMobilePhone = Srch.U.getSingleHHXMLNodeValue(hhProps, "MobilePhone");
    if ($isEmptyString(displayMobilePhone)) { displayMobilePhone = encodedMobilePhone }
    _#-->
    <div id="MobilePhoneValue" class="ms-srch-ellipsis" title="_#= encodedMobilePhone =#_">MobilePhone: _#= displayMobilePhone =#_ </div>
    </div>
    <!--#_
    _#-->
    Unfortunally the mobilephone does not appear in my search results. 
    What did I missed?

    First of all thank you for this quick reply.
    I changed all the properties from MobilePhone to CellPhone, but without result.
    <mso:ManagedPropertyMapping msdt:dt="string">&#39;WorkPhone&#39;:&#39;WorkPhone&#39;,&#39;CellPhone&#39;:&#39;CellPhone&#39;,&#39;Room&#39;:&#39;Room&#39;,&#39;Werkgebieden&#39;:&#39;Werkgebieden&#39;,&#39;AboutMe&#39;:&#39;AboutMe&#39;,&#39;AccountName&#39;:&#39;AccountName&#39;,&#39;BaseOfficeLocation&#39;:&#39;BaseOfficeLocation&#39;,&#39;Department&#39;:&#39;Department&#39;,&#39;HitHighlightedProperties&#39;:&#39;HitHighlightedProperties&#39;,&#39;Interests&#39;:&#39;Interests&#39;,&#39;JobTitle&#39;:&#39;JobTitle&#39;,&#39;LastModifiedTime&#39;:&#39;LastModifiedTime&#39;,&#39;Memberships&#39;:&#39;Memberships&#39;,&#39;PastProjects&#39;:&#39;PastProjects&#39;,&#39;Path&#39;:&#39;Path&#39;,&#39;PictureURL&#39;:&#39;PictureURL&#39;,&#39;PreferredName&#39;:&#39;PreferredName&#39;,&#39;Responsibilities&#39;:&#39;Responsibilities&#39;,&#39;Schools&#39;:&#39;Schools&#39;,&#39;ServiceApplicationID&#39;:&#39;ServiceApplicationID&#39;,&#39;SipAddress&#39;:&#39;SipAddress&#39;,&#39;Skills&#39;:&#39;Skills&#39;,&#39;UserProfile_GUID&#39;:&#39;UserProfile_GUID&#39;,&#39;WorkEmail&#39;:&#39;WorkEmail&#39;,&#39;WorkId&#39;:&#39;WorkId&#39;,&#39;YomiDisplayName&#39;:&#39;YomiDisplayName&#39;</mso:ManagedPropertyMapping>
    var has_CellPhone = !$isEmptyString(ctx.CurrentItem.CellPhone)
    <!--#_
    if(has_CellPhone == true) {
    _#-->
    <div id="CellPhoneField">
    <!--#_
    var encodedCellPhone = ctx.CurrentItem.CellPhone;
    var displayCellPhone = Srch.U.getSingleHHXMLNodeValue(hhProps, "CellPhone");
    if ($isEmptyString(displayCellPhone)) { displayCellPhone = encodedCellPhone }
    _#-->
    <div id="CellPhoneValue" class="ms-srch-ellipsis" title="_#= encodedCellPhone =#_">CellPhone: _#= displayCellPhone =#_ </div>
    </div>
    <!--#_
    _#-->
    Can you please tell me what I need to change?

  • 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

  • Media Manager - Images tranferred - Displays a red X

    Have 8703e BB. Have Internet Services turned off directly by Sprint - don't need it and do not want to be charged for the non-communication Casual Data Usage (a slick illegal method cell phone companies charge when internet services are turned off - had to file federal charges before they took it off my bill). Can't download ringtones or pictures.
    Tried to transfer ringtones and images a while ago and Media Manager would not recognize my device. Finally found out that without an external card, the Media Manager would not recognize my device.
    However, just installed the new OS and Desktop Manager 4.2.2.14 with Media Manager and it recognizes my device! 
    I transferred a ringtone from my PC to my device and...YES...Viva La Vida plays!!!!
    BUT, two images I transferred show up with a generic image thumbnail and the picture displayed is just a small red X in the upper left hand corner. Yet, when I highlight the folder in the device in Media Manager, the pictures display very clearly.
    To also clarify, the pictures reside in MEDIA>PICTURES>DEVICE MEMORY
    Under properties for the folder, the file path is - /Device Memory/home/user/pictures
    The sizes of the pictures are 37KB and 65KB, hardly any different than the images in the Preloaded Pictures folder, which path is /Device Memory/samples/pictures
    Is this a BB issue or Media Manager issue? As I said, the ringtone transferred and works, the images transferred and are listed, but don't display. Anyone have a solution to this problem?
    I've reset the device by taking the battery out, etc. Nothing. Pictures still give me the red x.
    Thanks,
    Dan

    Ok, so this has been driving me nuts for such a long time. I did everything that anyone suggested and nothing worked. This included creating a new temp internet files folder, checking and unchecking all the appropriate boxes, creating a new profile, and
    most other things suggested. Then I cam across something on a forum (sorry I don't know the link) that made me think. I looked through the reg to the key HKCU>Software>Microsoft>Office>15.0
    (I use outlook 2013 but previous versions of office were there as well.)>Outlook>Security>OutlookSecureTempFolder. My setting was C:\Users\"USER"\AppData\Local\Microsoft\Windows\TIF\Temporary Internet Files\Content.Outlook\B5U77NH4\.
    NOTE: TIF is where I chose to create the new Temporary Internet Files folder. Ur most likely will be different or not there at all!!!
    What I realized was that the last folder in this setting was different that the actual folder on my harddrive. So I edited just the last folder B5U77NH4 to be the same as the folder on my HDD. WALA this worked and works great currently. All the other fixes
    sometimes worked for a short while but always reverted back.  I do have to say though that prior to doing this I went into Internet Options and deleted all the browsing history. EVERYTHING it sucked for freq visited websites but I wanted to start fresh.
    Then I physically selected every item that was still in my Temp Internet files folder, even B5U77NH4 and manually deleted every item. That way any folder that was created dynamically would be gone. What was left and would not delete was B5U77NH4 so that is
    the folder I chose to copy into the registry.
    ]This has been so frustrating but now it seems to work. I hope this helps.

  • 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 ' '.

  • 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.

  • Importing Query & Display Templates from 11.5 to 12.1

    Hi,
    I am importing a project created in 11.5 into 12.1. The Query and Display templates are imported as .xml files. Can somebody explain how to properly import the existing Xacute, iGrid etc. query and display templates from 11.5 to 12.1? Is the migration tool a must?
    Regards,
    Chanti.

    Chanti,
    While you managed to get this to work, the migration tool should be used to get 11.5 project content into 12.0 / 12.1.  For some of the objects your risk for problems will go up significantly, since the migration tool provides all sorts of object level modifications to catch up with changes, etc. that a straight Workbench import is not expected to do.
    Regards,
    Jeremy

  • Configuration Manager - How to display all config info?

    Hi,
    I noticed that the Configuration Manager doesn't display (and allow you to edit) all of the info in configuration.xml. For example, the openhttp proxy properties aren't listed. Is it possible to expose these through the Configuration Manager? This link (the lone comment at the bottom of the page) seems to indicate that it is indeed possible but offers no explanation:
    [http://blogs.oracle.com/bbenac/2008/08/configuring_proxies_in_alui_co.html]
    Thanks.

    So I canu2019t do this, I canu2019t display all data on one page (until Iu2019m using JSF tags)?
    In JSF tags Iu2019m setting only path to file. In my bean Iu2019m using u201CReportClientDocumentu201D object itu2019s easy way to load report file (u201Copenu201D method) and set parameters (u201CgetDataDefController().getParameterFieldController()u201D method) and also connect to data base (u201Clogonu201D method) but I havenu2019t this property u201CsetSeparatePages(boolean)u201D.
    Maybe Iu2019m doing this wrong and there is a simpler way maybe I can use somehow u201CCrystalReportVieweru201D please give my any advice.

Maybe you are looking for

  • When I graded my iPad the YouTube app went away

    I upgraded my iPad 2 to the latest software and the YouTube app went away usually you can't even delete that app can someone help!

  • Scroll bar in spark application

    hi all i have developed a spark application, but its vey strange that scroll are not coming automatically if the application is resized. So how can i get the scroll bars. Please Help regards kapil arora

  • Regarding the address to locate picture in jar deployed

    Hi friends:    I deployed a jar which has a picture used for backgaroud(background="<root>common/banner.jpg">). but I don't know it absolute address,  could you please give me your  solution to find it to show the picture? thank you very much <TABLE

  • Input rule for Calcuate account

    Hello All, Please help me in the below scenario I have an account(A/c # 50001), Is Calculate is enabled for this account in metadata. I would like to manually input data for this account only for 2012. I have written the below script and try to test

  • How to uninstall Windows PowerShell

    I attempted In-Place install of Vista SP2 over an exiting Vista SP2, then a message said I must uninstall Windows PowerShell.  There is its short-cut in the program folder but there is no such entry in Add/Remove list. How can I uninstall the Windows