Content type visibility in document libraries

In a document library, once you have enabled content type management and added content types to the library, these content types are visible for the users in 3 places:

  • on the New toolbar menu,
  • when uploading a document
  • when editing a document’s properties

I was recently asked to tweak the visibility of content types in these 3 places, e.g. hide a content type from the New toolbar menu, but make it available for selection when uploading or editing a document’s properties.

There are 2 properties in SharePoint that affect the visibility of content types in these 3 places. (Well actually just 2 places – as the list of content types when uploading and when editing properties is the same – they are actually the same page). These are:

  • Visible on New Button (can be set through the UI – List’s Settings – screenshot below)
  • The Hidden property of the SPContentType object (can be set only through the object model)

The Visible on New Button (VNB) setting controls whether the content type appears on both the New AND Upload/Edit menu.

The Hidden property controls whether the content type appears on the New menu. It does not affect whether the content type appears on the Upload/Edit menu.

SharePoint does a logical AND operation on the 2 settings above to determine whether to show the content type. The table below explains this:

Visible on New Button is TRUE Hidden is TRUE Content type is ONLY visible on Upload/Edit properties
Visible on New Button is TRUE Hidden is FALSE Content type is visible on BOTH New menu and Upload/Edit properties
Visible on New Button is FALSE Hidden is TRUE Content type is hidden on BOTH New menu and Upload/Edit properties
Visible on New Button is FALSE Hidden is FALSE Content type is hidden on BOTH New menu and Upload/Edit properties

 

There is another twist: for a document library, if a content type is visible, but it’s document template is blank – you will get an option to upload, rather than to create new, under the New menu (as shown below).

Advertisement

About Bernado

Based in Australia, I am a freelance SharePoint and Dynamics CRM developer. I love developing innovative solutions that address business and everyday problems. Feel free to contact me if you think I can help you with your SharePoint or CRM implementation.
This entry was posted in Content Types, SharePoint. Bookmark the permalink.

2 Responses to Content type visibility in document libraries

  1. Aabed says:

    Well, i got “The Visible on New Button (VNB)” part i just wonder how to set the content type to HIDDEN!

    I have two content types, “ContentTypeA” must appear in the Upload Button, while “ContentTypeB” must appear ONLY in Upload\Document Properties
    if you would explain how and where to set it to HIDDEN

    thank you in advance

    Aabed Yassine

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s