I am trying to add code to a Sharepoint column list. I am able to do it on the main page and webpart.

However, when I try to add it to the subsite nothing works. I've tried adding the javascript code to a library to the subsite and use its link, to no avail.

This link is what I was using: http://www.ilikesharepoint.de/2015/03/sharepoint-2013-conditional-formatting-in-listviews/

Any help to get this to work on a SharePoint Subsite would great.

  • if the same code work in rootsite but not in subsite, I guess it is path issue. Please check all your script's path are pointing correctly. Use full path to validate. – Mark L Nov 16 '16 at 3:29

I would say the problem you're having is that you aren't referencing the js file correctly in your JSLink.

If you change ~site to ~sitecollection it should work so:

~site/_catalogs/masterpage/Display Templates/cond_formatting.js


~sitecollection/_catalogs/masterpage/Display Templates/cond_formatting.js
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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