Rename 'Like' link in custom lists
-
08-02-2021 - |
解決
You can use Client Side Rendering (CSR) for such requirements in SharePoint 2013.
Below is the code sample which replaces Like
button by a image stored in Style Library:
SP.SOD.executeFunc("clienttemplates.js", "SPClientTemplates", function() {
SPClientTemplates.TemplateManager.RegisterTemplateOverrides({
OnPreRender: function(ctx) {
SP.UI.Reputation.LikesHelpers.ImageUrls.$W = "/Style Library/hand-like-32.png";
SP.UI.Reputation.LikesHelpers.ImageUrls.$X = "/Style Library/hand-like-32.png";
}
});
});
You can find a full code and explanation at: Custom “Like”-Button in SharePoint List .
Check my answer given here to know how to set the JSLink
property of your Web Part:
Color Coding List Item by Web Part based on value
所属していません sharepoint.stackexchange