JSLink present in Discussion Board breaks Subject View

We had the requirement where we had to customize the Subject View using JSLink.

However we faced an issue where as soon as the custom JSLink is referenced in the webpart, the styling of the Subject View of Discussion Board breaks.

After a lot of research figured out that Discussion Board uses a default JSLink “sp.ui.discussions.js”  for the rendering of the Subject View

When we add the path to our Custom JSLink from the WebPart Properties, the custom JSLink overwrites the default JSLink and hence the styling breaks.

Inorder to fix this, we need to add reference to the default JSLink first and then Pipe it with our custom JSLink as shown below:

sp.ui.discussions.js | ~sitecollection/Style Library/Assets/JS/JSLinkCustom.js

Comments are closed.