Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 25064

Custom logo in SharePoint site

$
0
0

Scenario:

Site Collection has 20 sub sites within it and each site should display a unique image logo (note that this image logo is not the default site logo that gets displayed in the top left corner of the page, but an additional logo based on the site context). And, this logo should be displayed in the right corner of the title area.

I guess the best way to do this would customize the site master page. However, I'm facing problem in figuring out how to pick the image logo url based on the site context.

Approaches tried already:

I tried using HTML similar to the default site logo. Something like code shown below with ID values changed.

<div id="siteIcon" class="ms-tableCell ms-verticalAlignTop"><!--CS: Start Site Logo Snippet--><!--MS:<SharePoint:AjaxDelta id="DeltaSiteLogo" BlockElement="true" runat="server">--><!--MS:<SharePoint:SPSimpleSiteLink CssClass="ms-siteicon-a" runat="server" id="onetidProjectPropertyTitleGraphic">--><!--MS:<SharePoint:SiteLogoImage CssClass="ms-siteicon-img" name="onetidHeadbnnr0" id="onetidHeadbnnr2" LogoImageUrl="https://tavantpoc.sharepoint.com/sites/ok/Style%20Library/TavantLogo/Tavant_logo.png" runat="server">--><!--PS: Start of READ-ONLY PREVIEW (do not modify)--><img id="ctl00_onetidHeadbnnr2" class="ms-siteicon-img" name="onetidHeadbnnr0" Src="https://tavantpoc.sharepoint.com/_layouts/15/images/siteIcon.png?rev=23" alt="Content site" /><!--PE: End of READ-ONLY PREVIEW--><!--ME:</SharePoint:SiteLogoImage>--><!--ME:</SharePoint:SPSimpleSiteLink>--><!--ME:</SharePoint:AjaxDelta>--><!--CE:End Site Logo Snippet--></div>

But the LogoImageUrl attribute doesn't accept the SharePoint URL tokens.

The second approach I tried was to use a simple div element enclosing an img element (instead of the HTML code shown above) with the aid of SPURL Expressions. This produced an error page.

Any ideas/ possible solution approach to accomplish this scenario?



Thanks Arut





Viewing all articles
Browse latest Browse all 25064

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>