Alexander's Blog

Sharing knowledge with the global IT community since November 1, 2004

Working with Folder Content Types in MOSS 2007

/
/
ad-mania

Managing content in SharePoint is an art, not a science. There are various techniques that you can use to organize and display content in Microsoft Office SharePoint Server (MOSS) 2007. Use of folders is one way to organize data but I, and a lot of other Microsoft Certified Trainers (MCTs), have pretty strong feeling about the use of folders in SharePoint Document Libraries.

There are some situations that creation of folders may be warranted, however, as a general rule I discourage my students from creating folders in SharePoint libraries. I want to change their mentality so they no longer think about managing content the old-fashioned way……DOS directories and Windows folder. In SharePoint you can use columns, views and grouping to better organize your content.  Having said that, I came across a wonderful article written by fellow MVP Mikhail Dilov on his blog. The article was titled SharePoint Folders Need More Love. You will find much more background information on this topic in his article but I am going to use this article to demonstrate the creation and usage of Folder Content Types on my demo site. For more information on what Content Types are and another example of how you can use them, check out my blog post Working with Content Types in SharePoint 2007.

Advantages of Using Folder Content Type

When users create folders based on the standard Folder Content Type from the New menu, they can’t organize data very efficiently and end up facing the limitations of data organization that exist in Windows. More specifically, they don’t have the specific Content Types that they need in that folder. By creating custom Folder Content Types for the users, when they create a new folder they will automatically see the Content Types attached to that folder and display the appropriate information for them. You can even force users to enter certain type of metadata by making it mandatory. This gives you more control over how the data is displayed in folders, without having the limitation of the typical folders that are usually created in SharePoint using the default folders. With the use of Content Types, metadata, views and columns you can manage your content much more efficiently.

So let’s get started. First we will create a couple of new Folder Content Types so we can organize the data accordingly.

1. Go to the Site Actions, Site Settings, Modify All Site Settings (if it’s a publishing site) and create a new Folder Content Type, as shown below.

Best Practice: Create Folder Content Types at the top-level site so that the Content Types are available in all subsites and all libraries in the site hierarchy.

Select parent content type from: Folder Content Types

Parent Content Type: Folder

presentations_content_type

Create another Folder Content Type called Resources.

2. Now that you’ve created the Content Types in the Site Content Type Library, you need to add it to the Document Library that you are working with. You need to go to the library’s settings. For demonstration purposes I created a Document Library called Folder Content Types. In this library we will add two folders that are based on our custom Folder Content Types. One will be called User Group Presentations and the other Resources.

3. If you go to the library settings and do not see the Content Type section it’s because you have not enabled the management of Content Types. On the Settings page click Advanced settings and then under Content Types check the Yes box to enable the management of Content Types, as shown below. We also want to remove the ability for users to create the standard folders. In other words, we will remove the default Folder menu item and force users to use the Folder Content Types that we created. This way the users can only create folders that have the appropriate Content Type attached. Click No in the Folders section so the “New Folder” command is not displayed on the New menu, as shown below. Click OK to close the window.

advanced_settings

4. In the Content Types section click Add from existing site content types.

5. Locate the Content Types you created in step 1 and click OK to add it to your Document Library. The following screen shot shows how to add the User Group Presentations Content Type to the Document Library.

add_content_types

6. Once you have added the second Content Type (Resources in our example), users can use your custom Folder Content Types to create folders. They will not see the default Folder item on the New menu.

menu_items

7. The next step is to create the folders and then create a different view for each Folder Content Type that we’ve added so that the users can easily switch between the folders by using views.

8. Create a folder based on the new User Group Presentations Folder Content Type. You can even control the metadata that is added to each folder, as shown below.

folder_metadata

9. Create a second folder for Resources.

10. As far as views, we will first create a view for the root of the folder hierarchy. You could modify the default All Documents view if you wanted but let’s create a new view called Top-Level View. Make it the default view and in the Show this view option select the button In the top-level folder.

top_level_view

11. Create a view for the User Group Presentations called Presentations. Make this also a default view but in the Show this view option select User Group Presentations so that it is assigned to the specific Content Type called User Group Presentations.

content_type_view

12. Finally, create a third view for Resources. Make this too a default view but in the Show this view option select Resources so that it is assigned to the specific Content Type called Resources.

13. Now your top-level folder view will look like below.

top_level_view

14. When you click on the Presentations folder you will get a custom view for the Presentations and when you click on Resources folder you will get a view associated with the content in Resources folder.

presentations

15. You can also customize the menu options for each folder.

presentations_menu

Summary

Folder Content Types are a great way to work around some of the limitations in SharePoint. They are also a great way to benefit from some of the built-in features that SharePoint offers. If you create custom Folder Content Types for the users, they will automatically see the Content Types attached to a new folder at the time of creation and display the appropriate information for them. You can control, even make it mandatory, for the users to enter certain metadata for the folders. The use of Folder Content Types can definitely enhance your ability to manage content in SharePoint.


Copyright ©2009 Zubair Alexander. All rights reserved.

  • Facebook
  • Twitter
  • Linkedin

6 Comments

  1. Alexander,

    I’ve been struggling with designing a “Student File” system using SharePoint. My initial thought — since anything could be in the Student File such as transcripts, psych reports, etc — was to create a Folder for each student for ad-hoc documents that need to be attached. But there is no way I can see to use sharepoint workflow to create a folder.

    Then I thought “I could really just use columns on the documents if there was a simple way to mimic the behavior of folders”

    My thought was I should be able to bring up the “Student Record” in the student list and then have a button that says “show student documents” .. BUT
    I really wanted to do this without adding code since I want the resulting site to be maintainable by a bunch of users (teachers).

    Question 1: Which way would you go? Folders or Logical Folders?

    Question 2: Is there an easy to use the information on the current item to navigate to another list using that data as a filter without adding code? For instance, lets say I’m looking at a particular student item in the student list, can I add a button that would take me to the list of student documents but filtered just for the current student? This is kind of like [ME] being used in a My Items list.

    My issue seems so simple I thought there should be a simple solution:

    Create a list of items and allow each item to have one or more documents associated with the item.

    Any ideas? am I missing the obvious and being stupid? I got a whole bunch of complicated workflows completed and then ran into a brick wall where I never expected a brick wall LOL.

    Thanks for any help or direction.

    Chris M.

  2. Chris,

    I am not sure what you have running as far as workflows and I don’t know all the details about your configuration but if think what you need is a combination of content types, custom columns, views, and Folder Content Types.

    With SharePoint Designer and custom coding you can do just about anything you want. I don’t know of any way to add custom buttons to a list item right out of the box in SharePoint. Like I said, with custom columns, content types and SharePoint views you can do some amazing things and organize your data in ways that you couldn’t easily display in Excel Spreadsheets or other office applications.

  3. One thing I noticed when trying to apply the customized views is that you have to go back into the default view, and turn off the option to make it the default in all folders. Change this default view/overhead view to the root folder option, and this will allow your custom folder views to take over as defaults for your customized content type folders.

  4. Not totally related to this post. I want to be able to hide and/or show metadata columns when I upload something into my document library. I know it is possible I did it about a year ago but cannot remember how. I am using MOSS 2007. I have a document library with a content type associated to it. So when the user uploads a document to the library I want to collect specific metadata during the upload and remove the other metadata column from the screen/form. I am having hard time finding it doing searches. Any help would greatly appreciated.

  5. In your step 15, you state that “You can also customize the menu options for each folder”, but could you give details of exactly how to do that?
    I haven’t found a way to customize the document library menu based on a view or if you are in a particular folder type.

  6. Samer,
    I was pointing out that the menu shown in step 15 only includes PowerPoint, while the menu items in step 6 include Word, Excel and PowerPoint. I have covered the procedure for creating custom menu items in detail in the blog post “Working with Content Types in SharePoint 2007.”

Leave a Comment

Your email address will not be published. Required fields are marked *

This div height required for enabling the sticky sidebar