Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Automatically activate a feature

  Asked By: Beth    Date: Jul 24    Category: Sharepoint    Views: 2996

I have a feature that is scoped for web with an elements file
containing a list instance to provision another document library.

When I create a site, the site features screen contains the feature
for the document library. If I click Activate the document library is

How can I create a site and have the document library feature
automatically activated?



2 Answers Found

Answer #1    Answered By: Sharonda Mcfarland     Answered On: Jul 24

If you take a look inside the ONET.xml for the site  Definition of the
site you will find a section in the Configuration called WebFeatures.
Adding an FEATURE entry there which references the GUID of your Feature
will automatically  activate the Feature on any site which is provisioned
using that Site Definition.

Answer #2    Answered By: Cory Brooks     Answered On: Jul 24

I was wondering if there is a way to automatically  activate the feature
without creating a new site  definition.

I am a bit shy about using customized site definitions since we used them
extensively throughout our entire SharePoint 2003 implementation and will
consequently have a less smooth migration to SharePoint 2007. At this point
for our 2007 implementation, I am trying to stay with the out of the box
definitions using features  for changes in order to avoid future migration
issues. I am also thinking about the feature  staplers being used out of the
box . if I create  new templates with a new site definition, I am thinking I
will have to alter the out of the box staplers to include the new templates.
Am I thinking correctly?

Thank you for any thoughts.

Didn't find what you were looking for? Find more on Automatically activate a feature Or get search suggestion and latest updates.