I'm just wondering if Content Types are always only made out of Site Columns, or if it's possible to define Fields that only exist on that Content Type? (Like how you can add a custom Column to a list)

I'm currently creating some Content Types in Visual Studio using Elements.xml and just wonder if I'm "polluting" site columns with fields that are only useful on that content type.

up vote 10 down vote accepted

Creating site columns is the right way to go. You can add a list column to a list or library that is associated with a content type, but it isn't the same. The point is really to define your data properly. I kind of think that it is more likely that you are "polluting" the environment when you create the same field 10x as a list field versus a Site Column.

I agree with Mike.

Moreover, to make it feel less like pollution of your site columns, you can set the group of your site columns to a name that includes the name of the "primary" Content Type they are used in. This way the page that shows all site columns will appear well organised.

Your Answer

 
discard

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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