Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ListTemplateOwner

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.

like image 297
Danny Avatar asked Oct 27 '22 05:10

Danny


1 Answers

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.

like image 51
Per Jakobsen Avatar answered Nov 01 '22 19:11

Per Jakobsen