2

I'm just learning about this JSLink technology and have a simple question.

Does it work on public facing sites because it's not for me. Seems nothing works on public site.

What I've done:

  1. copied a js file from online
  2. uploaded it to my public site master page gallery
  3. tried to set content type to "javascript display template" but that didn't work (surprise)
  4. pointed the web part jslink property to the file and
  5. zippo. nothing happened.

Thanks

  • The JSLink you copied is of what type view/form/field? Can you share the URL of the file? – Amal Hashim Oct 19 '14 at 23:11
4

Client Side Rendering (CSR) that was introduced in SharePoint 2013 should work the same way no matter is it a public site or a private site collection. The below figure demonstrates the customized List View for a Blogs public site.

How to apply the changes

Let's say we need to customizes Blog list view in order to display Read more links for a public site.

  1. Create a rendering template, lets name it Blogs.js You could grab it from here
  2. Upload JavaScript file into Site Assets library
  3. Open Blog home page in Edit mode (Edit page). Specify for Posts web part JS Link property:

    ~sitecollection/SiteAssets/Blogs.js
    

    enter image description here

That's it.

Result

enter image description here

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.