Browsing Tag


    Microsoft 365 SharePoint

    How to reference your custom CSS within a Search Display Template

    Display Templates are incredible powerful within SharePoint 2013. You can create a new one based on an existing display template. To change the look & feel you create your own CSS. To reference to this CSS file you have to add the following code under the <body> tag:


            $includeCSS(this.url, “~sitecollection/Style Library/YourCSS.css”);


     In some cases a script tag already exists referencing a JavaScript file, just add the CSS reference within this tag, no need to create a new one.

    Hope this helps you save some time and create awesome display templates 🙂