列表模板所有者
我会保持简短和甜蜜。 有谁真的知道 elements.xml 的 "Receivers" 节点的 "ListTemplateOwner" 标签的真正含义是什么?
来自 Microsoft 网站: http://msdn.microsoft.com/en-我们/library/ms431081(loband).aspx
ListTemplateOwner:可选文本。 如果列表模板是通过功能注册的,则指定列表模板所有者的 GUID;如果列表模板是通过网站定义注册的,则指定网站定义的名称。< /p>
I’ll keep it short and sweet. Does anyone really know what the "ListTemplateOwner" tag of the elements.xml's "Receivers" node really means?
From Microsoft’s site: http://msdn.microsoft.com/en-us/library/ms431081(loband).aspx
ListTemplateOwner: Optional Text. Specifies the GUID of the list template owner if the list template is registered via Features, or the name of the site definition if the list template is registered by a site definition.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
如果列表是由功能中的 ListTemplate 定义的,则 ListTemplateOwner 是定义该列表的功能的 ID。
当您引用任何标准列表(ListTemplateId < 10000)时,您不需要指定 ListTemplateOwner(由于向后兼容性)
当您引用由您或第三方定义的列表时,那么您需要 ListTemplateId(> 10000 且与定义 ListTemplate 中的 Type 属性相匹配)和与定义 ListTemplate 的功能的 FeatureId 相匹配的 ListTemplateOwner 的组合。
这是因为当您定义 ListTemplate 时,规则是 Type 应该 > > 10000 并且在功能中是唯一的,但是任何数量的功能都可以有自己的类型为 10001 的 ListTemplate(定义列表的功能通常从 10001 开始)
如果列表是由站点定义中的 ListTemplate 定义的,则 ListTemplateOwner 是该网站定义的名称,但不要在网站定义中定义列表,而是在功能中定义列表。
If the list is defined by a ListTemplate in a Feature then ListTemplateOwner is the ID of the feature that defined the list.
When you're refering to any of the standard lists (with ListTemplateId < 10000) then you don't need to specify a ListTemplateOwner (due to backwards compability)
When you're refering to a list that's defined by you or a third party, then you need the combination of ListTemplateId (> 10000 and matching the Type attribute from the defining ListTemplate) and ListTemplateOwner matching the FeatureId of the feature that defined the ListTemplate.
This is due to the fact that when you define a ListTemplate the rule is that Type should be > 10000 and unique inside the feature, but any number of feature may have their own ListTemplate with type 10001 (and feature which define lists usually just start from 10001)
If the list is defined by a ListTemplate in a Site definition then ListTemplateOwner is the name of that Site Definition, but don't define lists in Site definitions do it in features.
这是不正确的,当设置为当前功能(包含列表类型的列表定义)时,功能 ID 不能正确定位接收器...
您需要做的是为每个列表模板提供一个唯一的 ID,无论拥有的特征。
This is not correct, the feature ID when set to the current feature, which contains the list definition for the list type, does not target the reciever correctly...
What you need to do is give each List Template a unique ID, regardless of the owning feature.
我猜测它指的是拥有列表模板的 SharePoint 对象的 ID (GUID)。 可以将其想象为数据库的 ID 列,这就是它的外键。
I am guessing that it refers to the ID (GUID) of the SharePoint object that owns the list template. Think of it like the ID column of a database and this would be it's foreign key.