SharePoint 2010:OOTB 博客列表的 schema.xml 在哪里?
问题:
OOTB 博客列表的架构在哪里定义? (即帖子、类别和评论列表)
列表模板和实例嵌入在 14/TEMPLATE/Blog 的 OOTB 博客网站模板的 onet.xml 中,但是没有提及列表的内容类型、字段或视图。
背景:
我创建了一个自定义网站定义(基于 OOTB 博客网站模板的副本),以便我们可以将品牌和其他自定义应用到我们的博客。
其中一些定制是由作为站点定义的一部分激活的功能接收器执行的。遗憾的是,SharePoint 从 onet.xml 提供项目的顺序如下:
- 网站已配置
- 功能已激活
- 功能接收器已激活
- 网站定义中定义的其他元素(例如列表) 已配置 onet.xml
(在我的例子中正在尝试更新评论和类别列表的权限)在创建列表之前被激活。解决方案非常简单:只需按照正常方式将列表创建为功能的一部分即可。
为此,我需要在 Visual Studio 中创建列表定义,但是我找不到这些 OOTB 列表的 schema.xml 文件。
Question:
Where is the schema of the OOTB blog lists defined? (i.e. for the Posts, Categories and Comments lists)
The list templates and instances are embedded in the onet.xml of the OOTB blog site template at 14/TEMPLATE/Blog, however there is no mention of the lists' content types, fields or views.
Background:
I have created a custom site definition (based on a copy of the OOTB blog site template) so that we can apply branding and other customisations to our blogs.
Some of these customisations are performed by a feature receiver that is activated as part of the site def. Unfortunately, the order in which SharePoint provisions items from the onet.xml is as follows:
- Site is provisioned
- Features are activated
- Feature receivers are activated
- Other elements (such as lists) defined in the site definition's
onet.xml are provisioned
As you can see, the feature receivers (which in my case are trying to update the permissions of the Comments and Categories lists) are activated before the lists have been created. The solution to this is very simple: just create the lists as part of the feature as per normal.
To do this, I need to create a list definition in Visual Studio, however I can't find the schema.xml files for these OOTB lists.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我正在开发一个类似的项目,但我
在解决方案中的 14\TEMPLATE\SiteTemplate\Blog\Lists\Categories 或 \Posts 或 \Comments 下发现了这些架构,据我所知,您必须具有相同的映射
希望有帮助
I am working on a similar project, but I found those schema under 14\TEMPLATE\SiteTemplate\Blog\Lists\Categories or \Posts or \Comments
in your solution you have to have the same mapping as far as I know
Hope that helps