Programaticlly change reference of display template for a CSWP

I have created a custom display template for one of my CSWP.
Now, How can I change the CSWP property - Item and Control Template, programmatically.
- GEM

Hi,
According to your post, my understanding is that you want to change the content search web part property.
To change the web part property, we can override the GetToolParts method and return a CustomPropertyToolPart object along with the base toolparts.
there is an article about this topic, you can refer to it.
http://www.lestersconyers.com/extending-search-web-parts/
More reference:
http://blogs.msdn.com/b/davidrei/archive/2012/12/27/sharepoint-2013-set-content-search-web-part-querytext-attribute-programmatically.aspx
Thanks & Regards,
Jason
Jason Guo
TechNet Community Support

Similar Messages

  • Custom Display template for Content Search webpart

    Hi,
    I am trying to customize the out of the box "slideshow" display template for content search webpart which renders Images.
    By default, the slideshow display template has a fixed the image size which is very small. Is it possible to increase the dimensions of the container or control template to show a much larger image size?
    Can anyone please help on how to do this?
    Thanks,

    Hi,
    According to your description, my understanding is that you want to increase the dimensions of the container or control template to show a much larger image size in the Content Search web part.
    I recommend to create a custom Display Template (control and Item display templates) and use JQuery Slider plugin to achieve this goal.
    More detailed information are provided in the link below:
    http://blogs.technet.com/b/sharepoint_quick_reads/archive/2013/08/02/sharepoint-2013-customize-display-template-for-content-by-search-web-part-cswp-part-2.aspx
    Best regards.
    Thanks
    Victoria Xia
    TechNet Community Support

  • 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

  • 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 change the default print template for broadcast PDF Export

    Hi,
    I have currently designed a print template for printing purposes and use this as the template for the print button(Export to PDF),if i were to click on this button the output pdf is the desired PDF. But if i were to broadcast the template with output format as PDF it picks the layout of the current template, how do i set broadcast to pick up the print template also???
    Further how to insert a page break in a PDF print template.

    Hi Nagesh,
    These setting are for
    1.Adhoc Template for Queries
    2. Adhoc Template for reports designed through report designer
    3. Template for query precalculation
    4. Template for displaying broadcasting wizard.
    When we use broadcasting from query designer  to email PDF's the system uses 0QUERY_TEMPLATE_BROADCAST_PDF.
    From WAD the system uses the current template layout as PDF Layout.
    P.S: OSS note 1054460 -<b>Depending on the BI object type and possibly other criteria, different Web templates are used in BI broadcasting to generate PDF (and PS or PCL) formats:</b>
    <i>For Web templates: the Web template itself is used</i>

  • 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

  • Content Search Web Part - display template Error

    Hi,
    I have an office 365 site, where in I have more than one Content Search Web Part and I have written custom display templates to be used in CSWP.
    Now, the issue is, whenever the page is browsed (intermittent in this case) and the page is edited to edit the CSWP (always in this case), the javascript files corresponding to the display templates are not loaded and because of which its throwing 'Sorry,
    something went wrong' error. 
    Thanks
    Senthil

    Hi Senthu,
    Any updates on this issue?
    Since there are articles describe how to customize template for content search web part, I'd recommend you refer to them and check/debug your script:
    http://blogs.technet.com/b/sharepoint_quick_reads/archive/2013/08/01/sharepoint-2013-customize-display-template-for-content-by-search-web-part-cswp-part-1.aspx
    http://blogs.technet.com/b/sharepoint_quick_reads/archive/2013/08/02/sharepoint-2013-customize-display-template-for-content-by-search-web-part-cswp-part-2.aspx
    If you suspect there is performance issue, you could test it on other browsers or machines.
    If the issue persists on reference in the script, please refer to the articles and try to find one which can meet your requirement.
    http://onlinecoder.blogspot.com/2013/10/localizing-cswp-display-templates-in.html
    Regards,
    Rebecca Tu
    TechNet Community Support

  • 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

  • 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

  • Change sponsor web logon template..

    I want to change the web logon template for sponsors
    http://docs.google.com/viewer?a=v&q=cache:SiE9cFifltIJ:www.southernct.edu/oit/uploads/textWidget/wysiwyg/documents/Guest_Server_Sponsor_Guide.pdf+guest+server+account+creation&hl=en&pid=bl&srcid=ADGEEShMEyhaxRAktDlQv7dUIUCXC0HcQAe2E7Uk9g0X6S_AJjS9AFB5MTxnNC6kZRCnSsNpRIBD1xHaHlnB3kHfXID5h9_cuI7un7ORBAgo-hy17fpvF-PfjCU09cK2qtcRWXUEX0qP&sig=AHIEtbRiEPRihQ9fT8XahwPkyJdtPqzEIQ
    Figure 17-1
    Is it possible to change the template? If so, where about is the file located on the server?
    Thanks

    Go through the below process where you can provide access for your login user id.
      1.      In the SAP Easy Access initial screen, choose SAP Menu ®  Tools  ® Administration  ® Maintain Roles  ® Role Administration  ® Roles , or use the Create Role pushbutton to go straight into the role maintenance.
           2.      Choose Create and Basic Maintenance (Menus, Profiles, Other Objects). Enter a name for the role as well as a short text, and save your entries.
    Choose a name that does not start with the prefix SAP as this namespace is already used by the predefined roles delivered as copy templates.
           3.      On the Description tab page, created and changed information is entered automatically. Compile a meaningful text to describe the function of the role.
           4.      Select the Authorizations tab page and then choose Expert Mode for Profile Generation.The pushbutton Selection gives you a list of all the available Authorization Templates. The templates for the BW user roles and tasks begin with S_RS_R.
           5.      Select a template and choose Adopt Reference.
           6.      Edit the authorizations if necessary.
           7.      Generate an authorization profile for the authorizations of the role.
    Choose the Generate pushbutton to do this.
           8.      Go back and assign the role to users on the Users tab page, using the relevant names in the list.
    The generated authorization profiles are automatically entered in the user master record for these users if you run a user master comparison. To do this, choose User Comparison and then Complete Comparison.
    You need to give below Authorization while performing 4th point.
    S_RS_ALL (Business Information Warehouse: All authorizations)
    Hope this helps u...
    Regards,
    KK.

  • How can I change the application default template

    Hi!
    If I go to Application Shared Components | Definition | Template Defaults I can see the default page template used by my application. One would think that this is the place to change the default template if wanted to change it, but NOOOOOOO..., like many other things ApEx that's not the way you do it. (An example is the order of columns in an interactive report... all those up/down arrows in there mean nothing if ApEx sets the column default order differently from what you set in the query source or the report attributes section. Nope. You have to log into the application as a developer, edit the column order in your interactive report, and save your report as the default, and THEN you'll get your ordering right. What are these ApEx developers thinking I just don't know...)
    I've search around the forums but I haven't found my answers (perhaps I haven't searched hard enough).
    So, how do I change the default page template for all pages in my application?
    Marc

    ...and once there, if you click on any of the templates looking for a way to set any of them as the default you'll be looking all day. You see the default column with check marks... why not implement the ability to check/uncheck defaults right there?
    Alas, if you click on Edith Theme <no>, then you can set the default template. It's a little link to the right under Tasks.
    My bad for still not understanding the way the ApEx interface works. It certainly isn't intuitive to me, but that's just me. Hopefully I'll get better.
    Marc

  • Managed property value is not returned in item template for ArticleStartDateOWSDATE

    Environment: SharePoint 2013 online
    Related parts: Search Result web part (OOB), Display template for search result items
    Base type: article page
    I have a search result page, it has a search result web part on it, for the display template, it is using a default for list, using  "single template to display items" option to point to a custom item template.
    The search returns list of articles, just title and abstract, it works fine. 
    We need to add "Article Date" to be displayed. "Article Date" is a OOB site column under "Publishing Columns".
    I found its field name is ArticleStartDate, then from search schema, I found the corresponding managed property name is "ArticleStartDateOWSDATE", the mapped crawled property is "ows_q_DATE_ArticleStartDate".
    In order to display it, I added managed property mapping to the item template to map to ArticleStartDateOWSDATE.
    The code is like,
    <mso:ManagedPropertyMapping msdt:dt="string">&#39;Title&#39;:&#39;Title&#39;,&#39;,&#39;MyArticleStartDate&#39;:&#39;ArticleStartDateOWSDATE&#39;</mso:ManagedPropertyMapping>
    var ArticleDate = $getItemValue(ctx, "MyArticleStartDate");
    The value of variable (ArticleDate) is empty when try to display it.
    Please let me know if you re-create this issue or have a solution to display the value. 
    BTW, on "Content search" web part, I can map ArticleStartDateOWSDATE to "Line 3", and display its value. So I know the managed property itself should be fine.
    Thanks in advance,
    John
    John Architect

    I think your input value is wrong,, when I did HTML decode of your Managed properties :
    &#39;Title&#39;:&#39;Title&#39;,&#39;,&#39;MyArticleStartDate&#39;:&#39;ArticleStartDateOWSDATE&#39;
    It gives :
    'Title':'Title',','MyArticleStartDate':'ArticleStartDateOWSDATE'
    i.e. wrong, if you see there is extra comma in between.
    try giving :
    &#39;Title&#39;:&#39;Title&#39;,&#39;MyArticleStartDate&#39;:&#39;ArticleStartDateOWSDATE&#39;
    or directly 'Title':'Title','MyArticleStartDate':'ArticleStartDateOWSDATE'
    get2pallav
    Please click "Propose As Answer" if this post solves your problem or "Vote As Helpful" if this post has been useful to you.

  • Choose display template based on result type - Content search webpart

    Hi 
    Is it possible to choose display template based on result type in content search webpart same like search results web part? If not available can it be achieved programmatically?
    The content search web part is queried against document content type. Based on the document type, the document has to be seen in the hover template.
    Please advise.

    Hi,
    From your description, my understanding is that you want to choose display template based on result type as search result Webpart in Content Search Webpart.
    You could customize your display template for Content Search Web Part, please refer to this article:
    http://www.benprins.net/2014/05/21/sharepoint-2013-custom-display-template-for-content-by-search-web-part/
    Best Regards,
    Vincent Han
    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
    [email protected]

  • Banner Display Time for One App Only

    I recently found an article (http://osxdaily.com/2014/01/29/change-notifications-banner-time-mac-os-x/#commen t-607754) showing a Terminal command to change the default display time for banner-style notification. It's a great thing, but then I thought...could there be any way to apply it to one app at a time? Say I want 10 seconds for Mail.app, 3 seconds for Messages and so forth.
    Can it be done? Thanks.

    It's called Trip Journal. The problem is, I think, that my iCloud backup wasn't current, because I'm travelling overseas, so data transfer has been largely up, and I don't think it has been backing up even when I was connected to wifi at my hotel.
    I did back up my iPhone to the computer this morning -- but that was after the crash occurred, so I don't know if any data will be salvagable.
    @Norman - I tried that, multiple times, but it hasn't worked.

  • Test button not enabled in Display Template...

    Hi,
    I created a query template then created a display template using that query. If i want to test that output then the Test button is not getting enabled. But if i use dynamic page generator or applet its working I am able to see the graph. Also Test button working in query template, only thing its not enable in Display Template.
    Thanks in Advance,
    Murugappan.

    Another method of quickly seeing changes to a display template is to use the <i>Dynamic Page Generator</i> accessed via the main xMII Menu under Visualisation Services > Dynamic Page Generator.
    Once there, pick the Query Template you are going to use from the top pair of applets, and use the bottom pair to select the Display Template you wish to "preview". Make sure that the Query Template is configured with default parameter values (i.e. that it returns good data when pressing "Test" immediately after opening it in the Query Template editor).
    Then, press the <i>Generate Image</i> button to have xMII run the query, pass the results to the selected Display Template and render the result as an image. Because the image name is random, it won't be cached by your browser, and you will be able to see changes to Display Templates without clearing your browser cache/restarting your browser.

Maybe you are looking for