How to Customize a SharePoint Features

Ratings:
(4)
Views:0
Banner-Img
  • Share this blog:

Customize a SharePoint Features

You can create and customize SharePoint features by using the Featured Designer in Visual Studio. For example, you can set the Feature scope and add other Features as dependencies. By default, the Feature Designer is opened when you add a new Feature in Solution Explorer or the SharePoint Package Explorer. Opening the Feature Designer You can add or remove SharePoint project items to a Feature using the Feature Designer. To open the Feature Designer

  1. In Solution Explorer, expand Features.
  2. Double-click the Feature1 item.

or

  1. Right-click the Feature1 item, and then click View Designer.
Desired to gain proficiency on SharePoint? Explore the blog post on the "SharePoint Training" course to become a pro in SharePoint.

Viewing the Packaged Manifest File You can use the Feature Designer to modify and generate the packaged manifest file for the Feature (feature.xml). Then, you can view the XML code for this file in Visual Studio. To view the packaged manifest file

  1. Open the Feature Designer.
  2. Click Manifest.

To view the packaged manifest file by using Solution Explorer

  1. In Solution Explorer, click Show All Files.
  2. Expand Features.
  3. Expand FeatureName.
  4. Expand FeatureName.feature.
  5. Open the FeatureName.Template.xml file.
 Note
When you open the Feature template manifest XML file, the files are automatically validated and the warnings that appear in the Error List window can be ignored.

Changing the Manifest Template You can change the XML code for the Feature manifest file in the Visual Studio XML Editor or the Manifest Template pane. Any changes to the XML code is merged into the packaged manifest file for the Feature. For example, you may want to change the manifest template to customize a Feature property. To change the manifest template by using the XML Editor

  1. Open the Feature Designer.
  2. Click Manifest.
  3. Expand the Edit Options node.
  4. Click Open in XML Editor.

Changes to the XML are merged into the packaged manifest file. To change the manifest template by using the Manifest Template pane

  1. Open the Feature Designer.
  2. Click Manifest.
  3. Expand the Edit Options node.
  4. Change the XML that appears in the Manifest Template pane.

Changes to the XML appear in the Preview of Packaged Manifest pane.

Overwriting the Packaged Manifest File You can disable the Feature Designer and create the feature.xml file manually. The first time that you perform this procedure, the current settings in the Feature Designer are saved to the Feature template XML file. Then, you can modify or overwrite the XML code.

 Note
If you add or remove SharePoint project items in the XML file while the Feature Designer is disabled, these project items are not packaged.

To overwrite the packaged manifest file by disabling the designer

  1. Open the Feature Designer.
  2. Click Manifest.
  3. Expand the Edit Options node.
  4. Click Overwrite generated XML and edit manifest in the XML editor.
  5. Click Yes.

The template is updated with the current packaged manifest file. Enabling the Feature Designer You can re-enable the Feature Designer to customize the feature.xml file. To re-enable the designer

  1. Open the Feature Designer.
  2. Click Discard manifest edits and re-enable the designer.
  3. Click Yes.

The template is refreshed with the original text, and any changes to the XML are lost. SCOPE AND ALLOWED FEATURES Web (Web site)

Site (site collection)

WebApplication (Web application)

Farm (farm)

For an in-depth understanding of SharePoint click on

 

About Author
Authorlogo
Name
TekSlate
Author Bio

TekSlate is the best online training provider in delivering world-class IT skills to individuals and corporates from all parts of the globe. We are proven experts in accumulating every need of an IT skills upgrade aspirant and have delivered excellent services. We aim to bring you all the essentials to learn and master new technologies in the market with our articles, blogs, and videos. Build your career success with us, enhancing most in-demand skills in the market.


Stay Updated


Get stories of change makers and innovators from the startup ecosystem in your inbox