I can get the name, url and description of a site using SP.Web but there is no logo property.
Is there a javascript COM equivalent to http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spweb.sitelogourl.aspx?
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It only takes a minute to sign up.
Sign up to join this communityI can get the name, url and description of a site using SP.Web but there is no logo property.
Is there a javascript COM equivalent to http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spweb.sitelogourl.aspx?
It looks like Microsoft have introduced the SiteLogoUrl property now within SPWeb in Office 365:
http://blogs.office.com/2014/08/13/uservoice-driving-improvements-sharepoint-api/ and https://officespdev.uservoice.com/forums/224641-general/suggestions/6234945-make-the-sitelogourl-property-available-in-csom
The <SiteLogoUrl>
element is emitted from the _api/web
REST service.
I believe there is no direct way to change the Site Logo from the Client Object Model.
However, you can change it through CSS by utilizing the s4-titlelogo
class:
Paste the following code in your CSS file:
.s4-titlelogo{
background-image: url(/path/to/yourimage.png);
background-position:left center;
background-repeat: no-repeat;
}
.s4-titlelogo > a > img{
visibility: hidden;
}