Friday 7 June 2013

Sharepoint feature example


1.Create sharepoint empty project(deploy it as farm solution)
2.right click on feature add feature
Contains  feature1.feature need to specify feature Title,description,scope(web=subsite,site=sitecollection,webapplication,farm)-àfeature.xml in moss 2007.called as feature manifest file

3.right click on the main application add empty element…this is elements.xmlàelements.xml in moss 2007. called as Element  manifest file

4. right click on the main application add application page..
5. go to elements.xml add the below code..
<?xml version="1.0" encoding="utf-8"?>

<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <CustomAction Id="SiteActionsToolbar" GroupId="SiteActions"
Location="Microsoft.SharePoint.StandardMenu" Sequence="100" Title="Welcome Page"
Description="Welcome to the site">
    <!--exact site collection  url http://syncgdc1412:9999/sites/newsite1 here am adding the application page
    url(what i added in the application) from the site collection name in url section.
    otherwise its taking from  http://syncgdc1412:9999/_layouts/Featureex/exwelcome.aspx (not taking the site collection name).
    need this url http://syncgdc1412:9999/sites/newsite1/_layouts/Featureex/exwelcome.aspx-->

    <UrlAction  Url="/sites/newsite1/_layouts/Featureex/exwelcome.aspx"/>
   
   
  </CustomAction>
</Elements>






6.Build deploy


7.After clicking will redirect to application page..

No comments:

Post a Comment