I'm having difficult rendering my JSLink file on a Custom List. My code looks to be fine from debugging, and I don't see any immediate issues if I include the code in a Script Editor, but my changes still aren't being applied. There are some weird issues going on in this site collection with custom lists in general; I can't tell if there's something inherently wrong/corrupt with this List Template Type or if it is my code.

Please advise.

Code included in .js file:


var itemCtx = {};
itemCtx.Templates = {};

itemCtx.Templates.Header = "<div id='container'><table><tr><td>Project Category</td><td>Project</td><td>Project Summary</td><td>Toolkit Compliance</td><td>Project Lead</td></tr>";
itemCtx.Templates.Item = ItemOverride;
itemCtx.Templates.Footer = "</table></div>";

itemCtx.BaseViewID = 1;
itemCtx.ListTemplateType = 100;



function ItemOverride(ctx) {

    var projCat = ctx.CurrentItem.projCat;
    var projSum = ctx.CurrentItem.Summary;
    var project = ctx.CurrentItem.Project;
    var projLead = ctx.CurrentItem.projLead;
    var projComp = ctx.CurrentItem.artCompliance;
    var html = "<tr class='content'><td><div id='projCat'>" + projCat + "</div></td><td>" + project + "</td><td>" + projSum + "</td><td>" + projComp + "</td><td>" + projLead + "</td></tr>";

        if (projCat == "Change Mangement") {

        else if (projCat == "Communications") {

        else if (projCat == "Modernization") {

        else if (projCat == "OBPI Support") {

        else if (projCat == "Process Improvement") {

        else (projCat == "Project Management Standardization"){
            $("div#projCat").addClass ("pms");
    return html;


The JSLink file was uploaded directly to the Masterpages Gallery as a Display Template Code. (There was not an option for JavaScript Display Template). And I copied and pasted an absolute URL versus a relative one for now.

*Also, two of the fields are lookup columns if that makes any difference.

  • What is the value of the JSLink property of the list web part configuration?
    – Drago Z.C.
    Nov 24, 2017 at 14:56
  • /sites/intra/_catalogs/masterpage/projDash.js Nov 24, 2017 at 15:06

1 Answer 1


Please make sure you are using the ~sitecollection URL token in your JSLink URL. In your case the URL should be ~sitecollection/_catalogs/.... Also, please make sure you check in, publish and approve your JS template file so that end users would be able to see the effect.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.