Up to this point we have not yet needed a new masterpage for our SharePoint Site Definition. We have a theme that some of our customers will use depending on their corporate SharePoint branding.
Currently I change the 'SiteLogoUrl' in my 'FeatureReceiver' on the 'FeatureActivated' event using the following code.
public override void FeatureActivated(SPFeatureReceiverProperties properties) {
AddThemeToSpThemes(THEME_ID, THEME_NAME, THEME_DESC, THEME_IMAGE, THEME_IMAGE);
SPWeb site = properties.Feature.Parent as SPWeb;
if (site != null) {
site.AllowUnsafeUpdates = true;
site.SiteLogoUrl = site.Url + "images/thLogo.gif";
site.Update();
}
}
FeatureActivated is not the best event to trigger on, I would prefer a theme applied event but I can't seem to find one. Perhaps I am not approaching this correctly.