开发者

Create list in existing site collection from a feature

开发者 https://www.devze.com 2022-12-14 03:29 出处:网络
I have created a feature, a publishing site, in Visual Studio to MOSS - this feature contains a masterpage, some page-templates, some site columns (grouped to match each page-template) and som custom

I have created a feature, a publishing site, in Visual Studio to MOSS - this feature contains a masterpage, some page-templates, some site columns (grouped to match each page-template) and som custom list templates etc. I have also created a site collection, some sites and pages based on my feature.

Now I have upgraded the code in my feature - I wanted a ListInstance to be created based on my custom list template. When I have upgraded my SharePoint (using WSPBuilder), the ListInstance and default data are visible if I create a new site collection, but existing site collection does not get the ListInstance and data. Is there anything I can do to update existing site collect开发者_开发知识库ions to contain the ListInstance when upgrading?


Unfortunately your only choice here is to programmatically create the list in all existing sites in the feature's FeatureActivated method in a feature event receiver. This is a gaping hole in sharepoint's deployment model, and a painful one at that.

-Oisin

0

精彩评论

暂无评论...
验证码 换一张
取 消