开发者

sharepoint extract portable schema.xml from custom list on site

I've created a custom list in a SharePoint site, but now I want to convert that into a list template so I can deploy it in other sites using a feature.

I've tried two methods:

  1. Use SharePoint Manager 2007 to copy/paste list schema into schema.xml and roll into a feature
  2. use stsadm extensions along the same lines

This hasn't worked well for me. I've been fighting this all day, and I get a variety of errors, from "Can't compile XML", to "Can't find feature XML", to "unknown error HRES开发者_如何学运维ULT: 0x80020009".

Are there any tools or straight-forward methods out there for doing such a thing, or am I more-or-less relegated to creating a custom Schema.xml by hand? Or, alternatively, are there any good tools just for generating list templates?


SharePoint Solution Generator (part of VSeWSS) usually works fairly well.

Creating a custom schema.xml isn't as hard as you might think from looking at the generated code - it turns out that almost everything in there is default values. You have to know a couple of magic numbers (14 for viewstyle and 0 for baseview if you want to be able to add a new view) but they end up being a lot more maintainable than the generated versions.

There is also the option of creating a list in code using a feature reciever - in a lot of cases this ends up being easier than dealing with SharePoint's "easy" process.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜