1

I'm fairly new to the SharePoint 2010 development world (I'm more of an infrastructure guy) so please bear with me.

We have a number of time zones we support and we would like to make these available to a large number of site collections.

In the past we have stored the time zones in a custom database, but I am hoping to change this and use the SP2010 out of the box functionality to centralise storage of the time zones.

My thought was to create a site column, add it to a content type then publish the content type from a CT hub.

However, I have encountered two issues with this:

  1. If I try to create a list definition based on a content type, Visual Studio appears to require that the content type be defined within the same solution - is that correct?

    Based on this article I don't seem to be able to create the content types declaratively and publish them from a CT hub. Could I instead create a farm-scoped feature with code to create the content types with a GUID? My concern is moving these developments between development and production environments.

A key requirement is being able to update the column centrally and push the changes to all site collections - something that was very easy when we stored the values in a custom database.

Any suggestions or thoughts welcome. Thanks in advance.

2
  • Which version of SharePoint? If you are looking to reference a time zone list throughout the sites, you could potentailly use the term store in Managed Meta Data if available. Commented Aug 28, 2011 at 19:36
  • It's SharePoint Server 2010 Standard Edition. My only concern with the MMS option is around ensuring that the terms have GUIDs that are consistent between dev/QA/Live.. Commented Aug 28, 2011 at 19:55

1 Answer 1

1

Visual Studio will look at the site to which your solution will be deployed for the content types. But it will also check and list first, content types defined in the solution.

It's preferred to create content types (in my opinion) declaratively, so that you can set the GUID - and for this reason it becomes easier deploying across environments because the GUID remains the same.

3
  • I did think the same but read this: "The problem with declarative content types is that they do not work correctly in content type hubs. Ideally, you would install the feature that contains the content types into the hub and then publish them to the subscribing site collections. However, this operation fails if the content types are created declaratively." from msdn.microsoft.com/en-us/library/… Commented Oct 3, 2011 at 17:26
  • I'm dubious. If you have a CT Hub set up somewhere, try it. Let me know if you don't.
    – James Love
    Commented Oct 3, 2011 at 19:04
  • Thanks James, I'll give it a go. Hopefully this was fixed in a service pack or CU, otherwise it could be a pain point for us. Commented Oct 4, 2011 at 22:27

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.