locked
How to give reference for CSS and JS files so that i can use them in search results RRS feed

  • Question

  • Hi

        I am making changes to search results but i dont know where i can refer custom CSS and JS files so that i can use them in search results of display templates. Kindly let me know any solutions.

    Thanks


    Razvi444


    • Edited by Razvi444 Sunday, November 17, 2013 2:10 PM
    Sunday, November 17, 2013 7:42 AM

Answers

  • There are number of options. 

    You can put it in MasterPage, LayoutPage or Display templates. 

    Here is the example. 

    <SharePoint:ScriptLink language="javascript" name="suitelinks.js" OnDemand="true" runat="server" Localizable="false"/>

    <SharePoint:CssRegistration Name="Themable/oslo.css" runat="server" EnableCssTheming="true"/>



    asim MCTS SharePoint 2007 -WSS 3.0

    Sunday, November 17, 2013 6:53 PM

All replies

  • you have two options 

    • Add the CSS and js references into the master page
    • Add the CSS and js references to the search page layout

    another option is you can also load js and css dynamically 

    http://www.javascriptkit.com/javatutors/loadjavascriptcss.shtml


    Hope that helps|Amr Fouad|MCTS,MCPD sharePoint 2010

    • Proposed as answer by Amr FouadMVP Monday, November 18, 2013 2:38 AM
    Sunday, November 17, 2013 5:15 PM
  • There are number of options. 

    You can put it in MasterPage, LayoutPage or Display templates. 

    Here is the example. 

    <SharePoint:ScriptLink language="javascript" name="suitelinks.js" OnDemand="true" runat="server" Localizable="false"/>

    <SharePoint:CssRegistration Name="Themable/oslo.css" runat="server" EnableCssTheming="true"/>



    asim MCTS SharePoint 2007 -WSS 3.0

    Sunday, November 17, 2013 6:53 PM