SOLVED

Unable to add content type hub 'custom columns' to content type custom word template ...

Brass Contributor

Hello. As I'm not able to change the template for custom content types in modern team sites (Office 365 Groups), I added my custom content types to the hub. In the hub I was able to change the template (Word). I also quickly realised that any custom columns had to be added to the hub too.

 

Now I am trying to insert / embed these custom columns into the document template (Word) but they don't appear as document properties when I edit the template and try to insert via Quick Parts.

 

Based on some research, I suspect that I need to do something like this:

 

  1. Wait until the hub content type is published to my site
  2. Add the hub custom content type to a custom library
  3. Create a document in the library using the new custom content type
  4. Insert the document properties (library meta-data) into the document
  5. Save a copy to my pc
  6. Upload this document to the hub replacing the old template attached to the custom content type
  7. Replublish

 

Which is a painful process considering how long publishing takes!

 

Or am I better to do something like this:

 

  1. Create my custom columns as site columns and not hub columns
  2. Add these site columns to my site library
  3. Add the hub content type to my site library
  4. Create a new document
  5. Save to my pc
  6. Upload this document to the hub content type

 

However, I'm not sure that this second scenario will work because, intuitively, I feel like the custom columns need to be defined in the same place as the content type. Therefore, the hub rather than the site.

 

Anyhow, unless anyone has some other ideas, I'll test the first scenario and report here how it goes.

 

Ian.

5 Replies
best response confirmed by Ian Macnaughtan (Brass Contributor)
Solution

Hi @Ian Macnaughtan,

 

this is exactly the reason why I don't like using the content type hub for Office 365 (Don't get me wrong in on-premises environment I'm happy with CTH, although if the customer has any needs to move to Office 365 in the future ...).

 

Additionally I don't like mixing publishing sites and team sites ( what would your CTH be based on??)

 

Back to your question ...

 

I have been using PnP Powershell to export and import fields/content types created in my template site collections and then on a regular basis I apply these to my sites. This way I can control publishing sites/ team sites issues but also I can handle when I want to publish the content types/fields. With a bit of PowerShell Magic I can even exclude unwanted content types. Even things like default values could be managed using this approach.

 

 

Thanks @Pieter Veenstra. That was quick! :)

 

I'm not exactly sure what you mean by "what would your CTH be based on??" but this is the rough scenario:

 

1. Yammer + Office 365 Group + Modern Team Site etc.

2. Custom library with custom content type for a number of organisational teams (divisions).

3. Flow that links the custom library to a couple of lists which are associated with a PowerApp that mobile teams use to read and update information in the field.

4. PowerBI report linked embeded on the modern team site.

 

While there are columns that are common for each division, they each have some unique columns. And significant differences in the content of the the word template. The word templates are also quite complex, lengthy and not easily converted to a list.

 

When i create the site via SharePoint admin centre (classic experience), I am able to change the custom content type template at the site level. This is my preference. However, I cannot do this for a group (modern experience) site. I get an "access denied" message. I thought my workaround would be to use the CTH but now I'm wondering ......

 

I like the modern team sites and the integration with Yammer, Groups etc. However, if the custom content types is not easy, I will go back to the classic team site and simply link the library to the Group site. Its not as integrated but might be the best compromise.

 

I should also say that the content types will not change a great deal so if I can get it working, the long publish time will not be such an issue.

 

Are you using PnP PowerShell with modern team sites or the classic team sites?

 

Thanks again.

On my comment:

 

"what would your CTH be based on??" 

 

Imagine if you have some team sites and you have some publishing sites.  When you create a custom publishing page content type based on a publishing content type then you would publish this to all team sites as well. So you would end up with a bit of a mix in the consuming sites.

 

I've used PnP PowerShell mainly for classic sites, but modern sites might be worth a try soon.

 

Thanks @Pieter Veenstra.

 

Understand now.

 

I just watched a couple of PnP webinars re modern sites. Looks interesting although not sure PnP would enable me to modify the content type templates.

 

I am also now getting an "access denied" error when asking a Group site to refresh the published content types:

 

2017-04-27 12_11_38-Content Type Publishing Hubs and 7 more pages ‎- Microsoft Edge.png

 

Therefore, I think I'm going to give up on the hub and go back to the non-Group site with content types defined at the site level. Its not perfect but it works and I need to make some progress.

 

Thanks again.

So my struggles with a Office 365 tenant wide site column should be discarded like an old rag? I want to use it for a recordsnumber where the records are in Another system. I just want to add it and index it. This shouldn't be this hard... :(

 

I've added the colum to the Content Type Hub but it won't show up in my sites. Set it up last week so it should be synced. I can't find anywhere I should configure it but that doesn't mean it's not there. Is there something I should do?

1 best response

Accepted Solutions
best response confirmed by Ian Macnaughtan (Brass Contributor)
Solution

Hi @Ian Macnaughtan,

 

this is exactly the reason why I don't like using the content type hub for Office 365 (Don't get me wrong in on-premises environment I'm happy with CTH, although if the customer has any needs to move to Office 365 in the future ...).

 

Additionally I don't like mixing publishing sites and team sites ( what would your CTH be based on??)

 

Back to your question ...

 

I have been using PnP Powershell to export and import fields/content types created in my template site collections and then on a regular basis I apply these to my sites. This way I can control publishing sites/ team sites issues but also I can handle when I want to publish the content types/fields. With a bit of PowerShell Magic I can even exclude unwanted content types. Even things like default values could be managed using this approach.

 

 

View solution in original post