Question

A couple of days ago, I was going to activate "Content Type Hub" in a site collection, but I realised that this feature doesn't exist in Sharepoint 2013 Foundation :(

I would need something like this, since the project I'm working on, it's for a client that is going to use a lot of Content Types in several site colletions.

I've been working on a PowerShell script to duplicate Site Columns and Content Types from one site collection to another differente site collection, basing on these articles:

Even though the scripts in the articles are fine, I need to modify them to not just duplicate Site Columns and Content Types in a second site collection, but update or delete, like if it were a Content Type Hub, but programmatically in a PowerShell script. It's not an easy solution and I would have to test this PowerShell script many times in a development environment before using it on a production environment.

My question is, is there any alternative to what I want? Do I have to keep working on my PowerShell script to have a Content Type Hub-like feature in my Sharepoint 2013 Foundation?

I cannot use:

  1. Sharepoint Online or Sharepoint Server/Enterprise 2013
  2. External paid software or add-ons
  3. Only one site collection

In other words, what would you do in my situation?

Was it helpful?

Solution

I don't recommend using the content type hub. Their are plenty of reasons why it's been deprecated. My personal experience with it have not been happy. Instead I created a script and an XML document that has content type & fields with a separate xml document for any metadata.

Getting data out of XML is incredibly easy and the benefit of having an XML document is that it makes future changes incredibly easy.

The script will take you quite some time however. So plan for it. Took me 4 weeks in total as I created import, export, add, edit, delete and backup (content and content types) functions.

The links you posted are the exact same links I followed to create my scripts. Take note to read the comments as some people have found more efficient means to dump the data to XML.

Update: My personal preference for VS content Types is to avoid them unless I'm creating them via an event receiver(/coded). Main reason being you're going to need to update them. When you do you will want the code to be able to create, edit and update existing content types which sometimes requires content migration. Code is the best way to achieve this. Once you have your base reusable classes all your future projects will benefit from your initial time spent and your future self will thank you.

OTHER TIPS

Create A solution in VS and add all your content types and make it available as feature. whenever I required I will activate the same in respective site collection.

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top