Tuesday, 11 June 2013

SharePoint 2010 - Create a Custom Feature

Create a Custom Feature in Site Settings Multiple Group Locations

Go to C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\FEATURES physical location
Create a folder (Ex: ManageLinks)
Create the following two files

                   1. Feature.xml
                   2. Elements.xml

 1. In  Feature.xml   Write the following code

<?xml version="1.0" encoding="utf-8" ?>
<Feature xmlns="http://schemas.microsoft.com/sharepoint/"
         Id="2294626A-735B-4CA7-B371-11848CA40348"
         Description="Manage eMail Links"
         Hidden="False"
         Title="Manage eMails"
         Scope="Web" >
    
    <ElementManifests>
        <ElementManifest Location="Elements.xml" />
    </ElementManifests>
</Feature>
        

    2. In Elements.xml Write the following code

<?xml version="1.0" encoding="utf-8" ?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/" >
    <CustomAction Id="B8EA2F40-61A9-4685-9CCE-7CC4D8612B0C"
                  Title="MSN"
                  GroupId="Galleries"
                  Description="Redirecting Hotmail Account"
                  Location="Microsoft.SharePoint.SiteSettings"
                  Sequence="0">
        <UrlAction Url="http://www.microsft.com"/>

    </CustomAction>

    <CustomAction Id="88E02BDD-A84A-47B3-8335-7BD2F16A11A3"
                  Title="Yahoo"
                  GroupId="Customization"
                  Description="Redirecting Yahoo Account"
                  Location="Microsoft.SharePoint.SiteSettings"
                  Sequence="0">
        <UrlAction Url="http://www.Yahoo.com"/>

    </CustomAction>

    <CustomAction Id="158D92D0-4C0C-4B6B-82EC-9DD92C2F4BC5"
                  Title="Gmail"
                  GroupId="SiteCollectionAdmin"
                  Description="Redirecting Gmail Account"
                  Location="Microsoft.SharePoint.SiteSettings"
                  Sequence="0">
        <UrlAction Url="http://www.gmail.com" />

    </CustomAction>

</Elements>

3.  Now go to command prompt in server . of the following location

C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\Bin

Use the following command to Install the Feature using STSADM.

stsadm -o installfeature -name "ManageLinks"

You will get operation completed message.

Now go site home page, Click on Site Action, Click on Site Settings.


Under Site Actions, Click on Manage Site Features

Find ManageLinks Feature and Click on Activate Button.

1 comment:

  1. Mallela Sreenivas11 June 2013 at 22:57

    So nice...very good article and useful to my learning...Thank you.

    ReplyDelete