Monday, August 22, 2011

Feature stapling

Using Feature stapling, you can activate default/custom features when a new site/web will be created.
The requirement of feature stapling roots to the problem of having certain features automatically activated when a new site(through site definition) is created. So we have 2 options to do this types of requirements.


1)Modifying the site definition(onet.xml)(Not a good practice)


2)Feature stapling(Feature inside feature).


Feature stapling means its nothing but nested features.
To create a staple you actually create another Feature that does the staple.


Feature stapling is implemented through a Feature that is specifically designed to staple other Features to one or more site definitions. Feature stapling allows a Feature to be stapled to any new sites created from any site definition or from specific site definitions based on the template name identified in the appropriate WEBTEMP.xml file

Diffrence b/w Team site and Publishing site

 

Team Site template :Bi –directional.--> a simple site template designed to help a group of people (a team?!?!) work together to exchange information and ideas.
Team site is a basic blank site with few extra list templates like announcements, task list etc. This is generally used for intranet application like employee portal. The team site is available both in moss and wss.
Publishing site : Uni-directional. à it is one way and more over we can use this for internet sites and it is have some extra features than team site.it is mostly developed by the custom page layouts.

Publishing site is used mostly for internet facing sites where there is need to create update delete webpages quickly. This template is available only in moss.
And if u want create sub site as publishing site the main site collection should be publishing site .