Thursday, September 2, 2010

Add a Custom Group of Actions in SharePoint 2007 Site Settings Page

Requirement: Adding a custom group of actions in SharePoint site settings page.

Solution: We can create a feature to achieve this. Here is what I've done:

  • Create a folder"MyCustomAction" under: C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES
  • Create these two files in MyCustomAction folder:

  • Feature.xml
  • Elements.xml
  • Place the below content in the above files:

    Feature.xml

    <?xml version="1.0" encoding="utf-8" ?>
    <Feature xmlns="http://schemas.microsoft.com/sharepoint/" 
    Id="5DFD12AF-D0AA-4c63-8FB8-C49DB1191083" Title="Custom Site Actions Feature" Description="Adds Custom Actions to the Site actions Menu" Scope="Site" Version="1.0.0.0">
        <ElementManifests>
            <ElementManifest Location="Elements.xml"/>
        </ElementManifests>
    </Feature>

    Elements.xml

    <?xml version="1.0" encoding="utf-8"?>
    <Elements xmlns="http://schemas.microsoft.com/sharepoint/">
    <!-- Custom Action Group -->

    <CustomActionGroup Id="MyActionGroup
    Description="This group contains all my custom actions.
    Title="My Custom Action Group" 
    Location="Microsoft.SharePoint.SiteSettings" Sequence="0" />
     
    <!-- Custom Action in Custom Action Group -->
    <CustomAction Id="MyCustomAction1"
    Description="This link is a custom action."
    Title="My Custom Action 1" 
    GroupId="MyActionGroup"
    Location="Microsoft.SharePoint.SiteSettings"
    Rights="ManageWeb" 
    RequireSiteAdministrator="FALSE"
    Sequence="1">
    <UrlAction
    Url="~sitecollection/_layouts/MyCustomPage1.aspx" />

    </CustomAction>

    <CustomAction
        Id="MyCustomAction2"
        Description="This link is a custom action."
        Title="My Custom Action 2
        GroupId="MyActionGroup"
        Location="Microsoft.SharePoint.SiteSettings"
        Rights="ManageWeb" 
        RequireSiteAdministrator="FALSE"
        Sequence="2">
       <UrlAction Url="~sitecollection/_layouts/MyCustomPage2.aspx" />
     </CustomAction>
    </Elements>

    Install and activate the feature by these commands:

    • stsadm -o installfeature -filename MyCustomAction\feature.xml
    • stsadm -o activatefeature -filename MyCustomAction\feature.xml -url http://Server/Site/Subsite
    • Iisreset
    Finally, you will get the feature activated and shown under site settings page as below image

    Add Custom Group to SharePoint Site Settings Page
    For SharePoint 2010, Here is the article: Add a Link to Site Settings Page in SharePoint 2010

        



    You might also like:
    SharePoint Usage Reports
    Usage reports, collaboration and audit for SharePoint.
    Document SharePoint Farm
    Automatically generate SharePoint documentation.
    *Sponsored


    Check out these SharePoint products:

    1 comment :

    Please Login and comment to get your questions answered!

    You might also like:

    Related Posts Plugin for WordPress, Blogger...