Friday 30 August 2013

Adding custom menu Item in Welcome Menu of SharePoint 2010


In this post i m going to add my custom menu in SharePoint 2010 Welcome Menu block .You can see default options which i have in my site's welcome menu block.  



Steps to add new menu item in welcome menu :


1.Open Visual Studio as administrator.

2.Create a new Empty SharePoint project.



3.Select for farm solution deployment



4.Add new feature to solution








5.Click on add new item




6.Select empty Element and rename it.



7.Write the below code in Element.xml file

<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <CustomAction
   
  Id="myCustomAction"
 
  GroupId="PersonalActions"
 
  Location="Microsoft.SharePoint.StandardMenu"
 
  Sequence="1000"
 
  ImageUrl="/images/changepassword.png"
 
  Title="Change Password"
   
  Description="Change your password from here">
   
  <UrlAction Url="/Pages/changepassword.aspx"/>
    

  </CustomAction>
 
</Elements>


9.Deploy the solution



10.Refresh page and click on welcome menu , you can see your newly added menu item








Monday 19 August 2013

Enabling Developer Dashboard using Powershell in sharepoint 2010

 


Developer Dashboard is a new feature in SharePoint 2010 , to take a look and understand the page performance . Now developer can see various performance related information and can optimize page performance accordingly .This feature was not availaible in early version of SharePoint .


1.Open Sharepoint 2010 Management Shell as administrator .


2.Basically their are 3 modes which Sharepoint 2010 provides for Developer Dashboard

a.) on - dispalys Developer Dashboard at the bottom of all the pages everytime
b.) off - it will disable the Developer Dashboard
c. ) onDemand - displays  the Developer Dashboard on click of an icon , at top-right corner of  the page.Developer Dashboard will be at the bottom of the page .

Note : Below is the example showing onDemand mode powershell script

$contentService =[Microsoft.SharePoint.Administration.SPWebService]::ContentService
$dashboardSetting = $contentService.DeveloperDashboardSettings
$dashboardSetting.DisplayLevel =[Microsoft.SharePoint.Administration.SPDeveloperDashboardLevel]::OnDemand
$dashboardSetting.Update()

3. Execute the above script on Sharepoint 2010 Poweshell . 

4. An icon at the  top-right corner of the page will gets appear .


 5. Click the icon , now  you can see your Developer Dashboard at the bottom of the page .