How to create Feature welcome page in SharePoint

No.of Views1132
Bookmarked0 times
Downloads 
Votes0
By  André Lage   On  22 Jun 2010 10:06:41
Tag : SharePoint , Design and Customization
Features in SharePoint is the paradigm set by Microsoft to make passage of solutions developed in Visual Studio, if pretending use and development control to measure the functionality by default.
emailbookmarkadd commentsprint

Images in this article missing? We recently lost them in a site migration. We're working to restore these as you read this. Should you need an image in an emergency, please contact us at info@codegain.com

 

Introduction

Features in Sharepoint is the paradigm set by Microsoft to make passage of solutions developed in Visual Studio, if prentende use and development control to measure the functionality by default.

To accomplish our solution used the following solutions:

Image Loading

 

Image Loading

 DLLs to support the development can be found where Sharepoint is installed by default in the C: \ Program Files \ Common Files \ Microsoft Shared \ web server extensions \ 12 \ ISAPI "with the names:

  1. Micrsoft.SharePoint.dll
  2. Micrsoft.SharePoint.Publishing.dll
Image Loading

We created a Solution with the WSP Builder template and select the "Feature with receiver"and created the structure as shown in the image shown below. 

Image Loading

Feature Example

Feature.xml

Its function define the formant of the solution to add the Sharepoint and has defined a set of methods and files to support our solution. 

Image Loading

Elements.xml

File support Feature.xml where he is set to pass the pages

Image Loading

Name: Name of the module where you define the page to copy to the site in Sharepoint mode Ghost *.

URL: Listing the Document Library where the pages will be added and updated.

RootWebOnly: this property has as its limit the copies of the root page of the Site in SharePoint.

Path: Feature Folder where the page to pass the copy to the SharePoint Site.

*- GhostTableInLibrary are files that are in the hive and FileSystem "12" which is reflected in the pages of site in Sharepoint support in future updates using Features, any changes made with the Sharepoint Designer UnGhosted the pages are not being updated with possible future upgrades Features of.

FeatureCode Exemplo.CS

Class Feature Activation of the page where we define "PageBoasVinda.aspx" as the first page access.

class Example: SPFeatureReceiver 
( 
public override void FeatureActivated (SPFeatureReceiverProperties properties) 
( 
SPSecurity.RunWithElevatedPrivileges (delegate () 
( 
if (properties! = null) 
( 
SPSite site = properties.Feature.Parent the SPSite; 
SPWeb web = site.RootWeb; 
PublishingWeb pubWeb = PublishingWeb.GetPublishingWeb (web); 
if (web.GetFile (String.Concat (pubWeb.PagesList.RootFolder.Url, "/ PageBoasVindas.aspx")). Exists)
( 
SPFile homePageFile web.GetFile = (String.Concat (pubWeb.PagesList.RootFolder.Url, "/ PageBoasVindas.aspx")); 
pubWeb.DefaultPage = homePageFile; 
pubWeb.Update (); 
) 
) 
));

)

 Installing the WSP solution and Installation of Feature in SharePoint site

Step 1

Image Loading

Step 2 

Image Loading

Step 3 

Image Loading

After activating the Feature page "PageBoasVindas.aspx" will be copied to the "Document Library Pages"and is defined as the first page to access the area. 

Image Loading

Whenever they need to make changes in Page, can change its content in Visual Studio and to upgrade the solution through this application a simple way.

Note:The last two screen shots are in different language,its just sample only

 

 
Sign Up to vote for this article
 
About Author
 
André Lage
Occupation-Not Provided
Company-Not Provided
Member Type-Senior
Location-Portugal
Joined date-09 Jun 2010
Home Page-Not Provided
Blog Page-Not Provided
 
 
Other popularSectionarticles
Comments
There is no comments for this articles.
Leave a Reply
Title:
Display Name:
Email:
(not display in page for the security purphase)
Website:
Message:
Please refresh your screen using Ctrl+F5
If you can't read this number refresh your screen
Please input the anti-spam code that you can read in the image.
^ Scroll to Top