Tuesday, January 8, 2019

SharePoint - Features & Elements

SharePoint - Features & Elements


we will take a look at features and elements. Features are in some ways the component model in SharePoint. They allow you to define logical units of functionality.
For example, you might want to have the ability within a site −
  • To create a list with a specific schema,
  • Have a page that will show the data from that list, and then
  • Have a link or a menu option somewhere within the site to navigate to that page.
You could create a feature, which defines that logical grouping of functionality. The individual pieces of functionality are defined by elements.

So there would be an element which −
  • Creates the list and sets the schema.
  • Provisions the page into your SharePoint site, and
  • Creates the menu option or the link.
The feature defines the unit and then the elements define the individual pieces of functionality inside of that unit. We discussed about the three kinds of elements −
  • A list instance to create a list.
  • A module to provision a page.
  • A custom action to create a menu option or a link.
However, there are many other kinds of elements that can be created within SharePoint. Another important concept to understand about features is that of activation and deactivation.
For example, if an end user wants the above-mentioned functionality to be added to his site, he would activate the corresponding feature that would create the list, add the menu option or link, and provision the page into their site. Later he could deactivate the feature to remove the functionality.
It is important to note that on deactivation of a feature, some elements are automatically removed. For example, SharePoint would automatically remove the menu option or link, which is defined by a custom action.
Others are not removed automatically. Therefore, in our case, the list instance and the page would not be removed automatically.
Hence, as a developer, you need to understand what elements get removed automatically and which ones do not. If you want to remove the ones that do not get removed automatically, you can write in code in a feature receiver.
Let us look at the working with features and elements. We will start with the end users view of features.

Step 1 − Open your SharePoint site.
SharePoint Sites

Step 2 − To go to the Site settings, you have two links that enable you to manage features.
  • The first link Manage Site features is under Site Actions, which enables you to manage site scope features.
  • The other link Site collection features under Site Collection Administration, which enables you to manage site collection scope features.
Manage Site Features

Step 3 − If you click on either of these links, you will be taken to a page, which shows the currently active and inactive features. For each of the features, you have an option to activate or deactivate the feature.



Features of Site

No comments:

Post a Comment

LET ME INTRODUCE MYSELF

Thank you all for your attention. I am glad to introduce myself. Well , I am durgadevi  from ariyapadaiyur.  I completed my Bsc -co...