I'm adding some content types to every standard-document library which is created over the "List Added"-EventReceiver. When a web is created the are some new doclibs for example in a team site there is are "shared documents" and "Site Assets".

My problem is that I only want to add the content types to the standard doclibs like "shared documents" in my example above but not in "Site Assets". How can I determine if a doclib is a standard doclib and not a sharepoint-specific doclib?

1 Answer 1


You can check the TemplateFeatureId property of the SPList object, to see which feature the list template belongs to. The AssetLibrary feature has ID={4BCCCD62-DCAF-46dc-A7D4-E38277EF33F4} .

In a Team Site on the other hand the "Site Assets" is created as a document library in code, using the same template feature as "Shared Documents" (ID={00bfea71-e717-4e80-aa17-d0c71b360101}). One thing that distinguishes the Site Assets lib though is that it has the IsAssetsLibrary property set to true. But that can only be used to identify if it is a Site Assets library or not.

Some clever combination of these should help you out.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.