Below you will find pages that utilize the taxonomy term “Delegatectontrol”
Google Analytics in Sharepoint
Google Analytics is a popular and mature tool for monitoring network activities on your site. Why not use it in Sharepoint? Dave Coleman and Mike Knowles provide good guides for doing that. There is a promising plugin to SP SPGoogleAnalytics which integrates both and provides an easy interface to put GA to your SharePoint installation and see the data directly on your intranet. It comes from codeplex: What do you think about spgoogleanalytics.codeplex? When I recently had to turn on Google Analytics on an intranet, I had no time for evaluating SPGoogleAnalytics, so I did the harder way: just put ga script in the end of a master page, just before ending tag. But what if one has multiple masterpages? Is there a way to put GA in one step? Maybe a user control like Knowles suggests?
Change the layout of Search Box without custom delegate control
The surest way to customize Search box in Sharepoint is to create a delegate control. In Sharepoint.Stackexchange there are many links to resources about this. But if you don’t have access to server or can’t deploy, the easiest way to do it is to style it with css. Thanks Steve Ottenad.
.s4-search .ms-sbgo a {
background:url(../images/search\_btn.png) no-repeat;
width:27px;
height:22px;
display:block;
}
.s4-search .srch-gosearchimg, .s4-search .ms-sbgo span {
display:none;
}
First we hide the the default image and then we add our image for search button as background.
Create own delegate control
In this post I’ll show how to create a simple (but own) delegate control. A short intro and links on delegate controls can be found on sharepointoverflow. Take a look on master page. There are already many delegate controls. The delegate control with id AdditionalPageHead can be used for adding your script or jQuery library.:
<SharePoint:DelegateControl
runat="server"
ControlId="AdditionalPageHead"
AllowMultipleControls="true"/>
You can also override existing controls like searchbox. But what if you want to add some content in the master page where no delegate controls are present. Of course, you can add it directly to the master page. Perhaps not on all webs? You can use placeholders to manage it. But do you want to update all the page layouts? So the solution is to use delegate controls, for adding multiple pieces of content or overriding using Sequence. In this example I’ll add some new content to the quicklaunch bottom area: