none
Reading the title of the CSWP from a custom control template RRS feed

  • Question

  • Hi,

    I have a custom control template wit a view modifications. The concerning CSWP has Chrome Type "None". 

    Now I want to design my own title bar with a paging functionality. How can I access the Title of the CSWP (with javascript ? ) to display it in the title bar.


    Monday, April 10, 2017 7:50 AM

All replies

  • Please check below mentioned articles for more details:

    http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2014/02/26/useful-javascript-for-working-with-sharepoint-display-templates-spc3000-spc14.aspx

    <cite class="_Rm" style="color:#006621;font-style:normal;font-size:14px;">https://www.martinhatch.com/2013/08/customising-content-search-web-part.html</cite>

    https://prasadpathak.wordpress.com/category/microsoft-sharepoint/sharepoint2013/sharepoint-2013-search/<cite class="_Rm" style="color:#006621;font-style:normal;font-size:14px;"></cite>


    Thanks, Amit Kumar, LinkedIn Profile ** My Blog

    Monday, April 10, 2017 8:15 AM
  • Thanks for the quick replay

    but these articles describe the possibilities in getting information of the search results.

    The ctx object descibes in the article

    http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2014/02/26/useful-javascript-for-working-with-sharepoint-display-templates-spc3000-spc14.aspx

    is the content object for your display template. There is no way described how to access the title of the WebPart himself.

    BR

    Axel

    Monday, April 10, 2017 9:24 AM
  • Hi Axel,

    To implement custom paging for the Content Search Web Part, the two demos below should be helpful:

    https://www.eliostruyf.com/adding-paging-numbers-control-list-paging-template/

    https://newoinc.wordpress.com/2015/05/14/simple-pagination-with-the-content-search-web-part/

    To put the paging button at the top or any place of a web part, this can be achieved by applying some custom CSS style to adjust its position.

    Best regards,

    Patrick 

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

    Tuesday, April 11, 2017 6:59 AM
    Moderator
  • Hi Axel,

    Just want to know if my reply helps you?

    Best regards,

    Patrick


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

    Friday, April 14, 2017 3:11 AM
    Moderator