Using a picture from the library as your site logo in a site definition.
So in our last article on site definitions we discussed how to create a site definition that creates a picture library. And within that library we add an image that we wanted to be the default site logo. Now we need to make one modification to our default.aspx to force the site to use our logo on the home page. If we open the site we need to find the <!--Title--> section and change the section below in bold.
<!-- Title -->
<tr> <td colspan=3 class="ms-titleareaframe"> <div class="ms-titleareaframe"> <table width=100% border=0 class="ms-titleareaframe" cellpadding=0 cellspacing=0> <tr> <td style="padding-bottom: 0px"> <table style="padding-top: 0px;padding-left: 2px" cellpadding=0 cellspacing=0 border=0> <tr> <td align=center nowrap style="padding-top: 4px" width="132" height="46"> <img ID=onetidtpweb1 src="SiteImages/wpd.gif" alt="Icon" height="49" width="49"> </td> <td><IMG SRC="/_layouts/images/blank.gif" width=22 height=1 alt=""></td> <td nowrap width="100%" style="padding-top: 0px"> <table cellpadding=0 cellspacing=0> <tr> <td nowrap class="ms-titlearea"> <SharePoint:ProjectProperty Property="Title" runat="server"/> </td> </tr> <tr> <td ID=onetidPageTitle class="ms-pagetitle">Home<!-- --></td> </tr> </table> </td> <td align=right valign=top> <table cellpadding=0 cellspacing=0 height=100%> <tr> <SharePoint:ViewSearchForm ID="L_SearchView" Prompt="Search this site" Go="Go" Action="searchresults.aspx" runat="server"/> </tr> <tr style="padding-right:1px"><td colspan=5 nowrap style="padding-bottom: 3px; padding-top: 1px; vertical-align: bottom" align=right class="ms-vb"> <span class='ms-SPLink'> <span class='ms-HoverCellInActive' onmouseover="this.className='ms-HoverCellActive'"; onmouseout="this.className='ms-HoverCellInActive'"> <WebPartPages:SettingsLink runat="server"/> </span> </span> <WebPartPages:AuthenticationButton runat="server"/> </td></tr> </table> </td> </tr> </table> <table cellpadding=0 cellspacing=0 border=0 width=100%> <tr> <td class="ms-titlearealine" height=1 colspan=5><IMG SRC="/_layouts/images/blank.gif" width=1 height=1 alt=""></td> </tr> </table> </td> </tr> </table> </div> </td> </tr>
<tr valign=top height=100%>
<!-- Navigation -->
That is it. Now if your users want a new site logo all they have to do is replace the file in the picture library.
You will also notice that by default SharePoint resizes the picture to 49 x 49. We played with sizing and ended up modifying this to take up the whole space.
1 more article to go and then I will leave the CAML alone. He smells funny so I will not miss him.
Shane
SharePoint Help