我有一些网站定义,其中我已将多个列表添加到<Lists>标记中,然后我添加了一个装订功能,当使用这些网站定义之一创建站点时,将触发一系列Web范围的功能。< / p>

这一切都是正常的,并且在某些功能中,我需要在一些列表中更改一些视图。我有30多个在网站创建时创建的列表,其中20多个需要基于它们的基础内容类型添加到它们的不同列以及使用哪些站点定义。

我避免创建自定义列表定义,因为所有列表都只是文档库,任务列表,日历等,需要添加一些额外的列,但这一切都取决于所使用的网站定义。

我面临的问题是功能似乎无法找到列表并抛出

列表名称在这里的网站名称不存在。”

例外。但是如果我使用列表实例添加列表并通过另一个功能添加它们,那么我的列表更改功能 can 找到它们。

所以我想知道网站定义的<Lists>标签中的列表是否在被激活之前或之后创建,如果是后者,他们如何抛出这个例外?

有帮助吗?

解决方案

If I remember correctly the flow is:

  • Site Collection Scoped Features
  • Web Scoped Features
  • Lists
  • Modules

Your stapled features would be shot in after Site collection scoped features or Web scoped features (depending on scope) and hence the lists is not guaranteed to be created before the lists.

Found a source here: http://blogs.msdn.com/b/chrischiaro/archive/2011/01/18/sharepoint-site-definition-provisioning-order.aspx

许可以下: CC-BY-SA归因
scroll top