0

Is there a way we can set the SiteUrlLogo using JSOM in custom Master Page using visual studio?

1

Not sure if this is also made available for SP2013 on-prem but in O365 it should be possible as this was added to the API some time ago: https://blogs.office.com/2014/08/13/uservoice-driving-improvements-sharepoint-api/.

Have a look here for an example: http://mosshowto.blogspot.nl/2015/10/branding-sharepoint-online-javascript.html.

Snippet from the link:

var context = new SP.ClientContext.get_current();
var web = context.get_web();

web.set_masterUrl('/sites/intranet2/_catalogs/masterpage/oslo.master');
web.set_siteLogoUrl('/sites/intranet2/Style%20Library/images/Contoso-Blue.png');
web.set_alternateCssUrl('/sites/intranet2/Style%20Library/CSS/Contoso.Intranet3.css');

web.update();
context.executeQueryAsync(onQuerySucceeded, onQueryFailed);

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.