Hi,
i have a problem with a webpart in which i set the property of a JSLink. I want to change the display of 'SharePoint blog posts. The JavaScript is as follows:
(function () {
var overrideCtx = {};
overrideCtx.Templates = {};
overrideCtx.Templates.Fields = {'Body':{'View': CBody}};
SPClientTemplates.TemplateManager.RegisterTemplateOverrides(overrideCtx);
})();
function CBody(ctx) {
var ret = ctx.CurrentItem.Body + "</br><a href="">Test</a>";
return ret;
}
Thew problem is that it seems to work correct but only on the first request or after a refresh, for example when i request the page with the blogposts then the Link appeares in every post. When i klick on a blog title the in the blogpost the Link disappeares, then when i refresh the page the link appeares again.
What can i do to solve the problem?
Bye Arne