I want to use taxonomy fields for my "shared documents" and announcements. I can create the column afterwards.
But what is the best way to do it automatically when a user creates these lists or a site containing them is provisioned?
|
I want to use taxonomy fields for my "shared documents" and announcements. I can create the column afterwards. But what is the best way to do it automatically when a user creates these lists or a site containing them is provisioned? |
|||
|
|
|
The easy way to do this is to change the underlying content types for these lists at the site collection level (i.e. Site Actions > Site Settings > Site Content Types (under Galleries). Announcements is pretty straightforward because there is an Announcements content type. You can add the column to that content type and any existing or newly created lists (...at the root site/web or any subsites) that are derived from that content type will inherit that new column. You can use the same approach with Shared Documents, but be aware that Shared Documents is derived from the Documents content type and adding a column to that content type would be affecting all libraries if you make that change. Another reasonable, but much more involved, approach is to create a custom site template that has these lists/libraries the way you want them and make sure new sites are created using that template. EDIT: Here's a code snippet for creating the columns during feature activation...
You'll need to provide the term store and term set Id's to complete this, but it should give you a general idea on approach. |
|||||||
|
|
You can also add keywords column to your lists as described here
|
|||
|
|