Sharing the experience search

Search sharing-the-experience.blogspot.com

Friday, May 20, 2011

"SharePoint 2007 to 2010 Upgrade" online project: Developer dashboard on the custom page\master.page

Started migration SharePoint 2007 site definition to SharePoint 2010. I keep old look and feel. My site has own custom master page. After migration the master.page remains untouched which is not bad thing. But there is one drawback I have found so far: There is not button to turn Developer Dashboard on my custom master.page. Even though I ran the command: 
$DevDashboardSettings = [Microsoft.SharePoint.Administration.SPWebService]::ContentService.DeveloperDashboardSettings;
$DevDashboardSettings.DisplayLevel = 'OnDemand';
$DevDashboardSettings.RequiredPermissions = 'EmptyMask';
$DevDashboardSettings.TraceEnabled = $true;
$DevDashboardsettings.Update()


 This is actually an expected behavior. The  DelegateControl is placed in the new master page - v4.master.
Since I use my old one - the control just is not there.


To make use of the Developer Dashboard on the custom master page, modify the custom master page with following:


Just put the following control under <SharePoint:DelegateControl ControlId="GlobalSiteLink1" Scope="Farm" runat="server"/> : 
<Sharepoint:DeveloperDashboardLauncher
        ID="DeveloperDashboardLauncher"
        NavigateUrl="javascript:ToggleDeveloperDashboard()"
        runat="server"
        ImageUrl="/_layouts/images/fgimg.png"
        Text="<%$Resources:wss,multipages_launchdevdashalt_text%>"
        OffsetX=0
        OffsetY=78
        Height=16
        Width=16 />

And put the DeveloperDashboard control at the bottom somewhere (I have chosen to put it in the ContentPlaceHolder id="PlaceHolderUtilityContent"):

 <asp:ContentPlaceHolder id="PlaceHolderUtilityContent" runat="server"> 
    <SharePoint:DeveloperDashboard runat="server" />
<div id="DeveloperDashboard" class="ms-developerdashboard" />
  </div>
  </asp:ContentPlaceHolder>






2010! Here I come

No comments:

Post a Comment