Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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.

share|improve this question
    
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. –  Mike Oryszak Aug 28 '11 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.. –  Benjamin J Athawes Aug 28 '11 at 19:55
add comment

1 Answer

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.

share|improve this answer
    
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/… –  Benjamin J Athawes Oct 3 '11 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 Oct 3 '11 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. –  Benjamin J Athawes Oct 4 '11 at 22:27
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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