Define a per-folder content type

SharePoint allows you to define content types per library.

harmon.ie adds a new mechanism that allows you to hide content types in specific folders.

To define a content type that will be hidden in specific folders:

  1. In the SharePoint library or site, create a column with these settings:
    • Name: NotAllowedInFolders_xxx (replace xxx with a meaningful and unique name, such as the non-allowed folders name).
    • Type: Single-line text
    • Default Value: a semicolon-separated list of the folders that will not show this content type.
      • To hide this content type from the library root folder, set the Default Value to LibRootFolder. LibRootFolder can be combined with other folders as well.
      • To hide the content type from a folder and its sub-folders, add <folder name>/* to the Default Value.
    • If you created the new column in a SharePoint library: uncheck Add to all content types (unless you want to add this column to all content types that are used in the given library) and Add to default view.
  2. Make sure the content type you want to hide from specific folders is defined in the required SharePoint library.
  3. Add the column you created in step 1 to this content type.

Note: This method applies to folders only, and not to document sets.

Example:

To hide the Documents content type from the Proposals and Contracts folders:

  1. Create a column in the library or site:
  2. Add the column to the content type:
  3. The column in the content type: