A visual approach to content type tagging for your document library

In a previous post, I dove into the scary underbelly of file repositories. Most document libraries are a hoarder’s paradise, complete with hundreds of sub-folders and thousands of files. These document libraries are 1-way streets. You can easily upload your content to them, but it is virtually impossible to go the other direction and find/retrieve files. In order to maximize usefulness and value, we need our document libraries to support 2-way traffic–file upload and easy file retrieval.

Document uploads are relatively easy. Most of our business users can figure out how to upload a document (or know someone with a few SharePoint skills that can teach them how to drag-and-drop in SharePoint 2013). Content retrieval is much harder. It relies on “advanced” features like metadata, content types, document sets and information policies to make documents find-able and retrieve-able. Unfortunately, metadata is often a tough sell. We try to convince our end-users that metadata can help them with document retrieval, but getting them to consistently apply metadata tags to the documents they upload is a nearly impossible task. Unless you’re working for a company (or industry) that requires document metadata tagging as a fundamental job requirement, your only lasting hope is to make metadata tagging simple, easy or automatic. This post walks through an everyday business scenario for document storage and outlines an out-of-the-box metadata tagging solution that was built to support it.

Business Scenario

You’ve just been assigned as the project manager for a new software development project. Since you’ve worked on other project teams and seen firsthand the challenges of storing project documents in gargantuan file repositories, you know you want to implement a metadata tagging scheme for your project content. The goal is to tag each project document as it gets uploaded to SharePoint, and then use the metadata tags to build a browse-able document navigation tree for your SharePoint site. The challenge is figuring out how to design and use tags that reflect both the document’s purpose and the project lifecycle stage that the document pertains to.

You sit down with your SharePoint SME (subject matter expert) to find a solution to this tagging conundrum, and together you devise a graphical model of your content:

ContentType26

Your model breaks down all project documentation into 6 categories: project discovery, project scoping, solution building, solution testing, solution deployment and iterative change management.

Each of these 6 content categories have different information needs. Discovery and Scoping documents, for example, need to be tagged with the assigned business analyst resources that will write/finalize solution requirements. Build documents need to be tagged with code review/release dates and Test documents need to be tagged with test status and tester assignments. All content categories need to be tagged with the release/version number they apply to.

Your SharePoint SME suggests using content types to organize your metadata fields. He plans to build one content type for each of your six project categories. Each content type can present targeted metadata fields that are specific to each project category AND provide default values where applicable. And because you’d be using content types and metadata fields to tag your content, you could store all your project documents in a single document library with (gasp) no file folders! The trick is designing a quick and easy way for users to upload and tag their project documents.

The approach

We know we’re building a single document library with six custom content types. But how do we quickly and easily enable users to specify which content type their file(s) belong to? An out-of-the-box solution doesn’t cut it, because we know our users won’t go through the process of selecting their appropriate content type when they upload their files.

Your SharePoint SME goes back to the drawing board and comes up with a creative idea. How about displaying buttons on the main page of your site….and make each button a clickable link? When users click on a button, they’d be taken to the document upload page for that corresponding content type (effectively bypassing the need to select the content type of the document they are uploading). Yes, your users would still need to add in metadata that applies to their document’s content type, but we’d be able to sidestep the content type selection in its entirety. We can also plug in default column values for each content type, simplifying the metadata tagging process. Sound interesting? Let’s take a look at the steps for building this out.

Part 1: Creating your new content types

  1. Click on Gear > Site settings.
  2. Under Web Designer Galleries, click on Site content types.
    ContentType01
  3. Click on the Create button.
  4. In the Name field, type Discovery.
  5. In the Select parent content type from field, select Document Content Types.
  6. In the Parent Content Type field, select Document. Your page should now look like this:
    ContentType02
  7. Click OK.
  8. You will be taken to a configuration page for your new content type. Click on the Site Content Types page header to return to the Site Content Types page.
    ContentType03
  9. Repeat steps 3-8 to create each of your new content types.

Part 2: Setting up your document library

  1. Click on Gear > Add an app.
  2. Select the Document Library app.
  3. When prompted, enter a name for your new document library.
  4. When you are returned to the Site Contents page, find and click on the blue icon for your new document library.
  5. While in your new library, click on the Library subtab and the List Settings icon.
  6. Click on Advanced settings and set the Allow management of content types field to Yes.
  7. Click OK.
  8. Go to the Content Types section of the page and click on the Add from existing site content types link.
    ContentType04
  9. Locate the dropdown field that controls the content type groups being displayed. Change the dropdown value from All Groups to Custom Content Types. Your newly created content types will display in the Available Site Content Types box.
  10. Select one of your new content types and click on the Add button. Repeat this step until all your new content types have been added (as shown below).
    ContentType05
  11. Click OK. You are now returned to the main list settings page.
  12. Go to the Content Types section of the page and click on the Change new button order and default content type hyperlink.
    ContentType06
  13. Uncheck the checkbox for the Document content type and click OK. Also make sure your content types are ordered correctly. Since we want our content types to be listed in the order of our project phases, our content types appear in the following order:
    • Discovery
    • Scope
    • Build
    • Test
    • Deploy
    • Change
  14. Now it’s time to create all the new columns for your document library. As you create your columns, be mindful of the new Add to all content types checkbox that now displays on your column creation page. If you leave this box checked, the column you are creating will automatically be added to each of your 6 project lifecycle content types. If you leave the box unchecked, you’ll need to manually add this new column to the individual content types where you’d like it to be used.
    ContentType12
  15. Once all your columns are defined, it’s time to determine which field(s) should display for each of your content types. To get started, go to your List Settings page and click on the hyperlinked name of one of your content types.
  16. When the content type detail page appears, click on the Add from existing site or list columns hyperlink.
  17. Add the fields you want to display for this content type.
  18. Use the Column order link to define the order in which the content type’s fields should display.
  19. Click on the Settings link in your page’s breadcrumb to return to the list settings page.
  20. Repeat steps 16-20 to define the metadata fields for each of your other content types.
  21. Now it’s time to set up the default values for your metadata columns. This step requires a bit of extra work in SharePoint 2010 and SharePoint 2013. Go to your List Settings page and click on the Column default value settings link.
    ContentType13
  22. To enter a default value for one of your columns, click on the column name and follow the on-screen prompts. After entering my default values, my column default value settings page now looks like this:
    ContentType14

Part 3: Determining the upload URLs for each of your new content types

Now we need to build a custom upload URL for each of your project lifecycle content types. These are the URLs that we’ll associate with your document upload buttons. The first step in building these URLs is turning off the Minimal Download Strategy feature via your site features page. The Minimal Download Strategy feature impacts the length and character of your site’s URLs, making it harder for this solution to work.

  1. Go to your Site Settings page by clicking on Gear > Site Settings.
  2. Click on the Manage site features link under the Site Actions heading.
  3. Scroll down and find the Minimal Download Strategy feature. If there is a Deactivate button next to the feature, click it.
  4. Click on the Deactivate link to confirm you want to deactivate this feature.

Now we’re ready to build your custom upload URLs. Here are the steps you’ll need to follow:

  1. Go to the Library Settings page for your document library.
  2. Copy the URL that is displayed in the address bar of your web browser.
  3. Open a text-based editor on our computer (e.g. Notepad or WordPad).
  4. Paste your copied URL into your text editor.
  5. Find the word listedit in your URL and replace it with the word upload.
    ContentType15
  6. Go to the end of the URL in your text editor and type &Source=
  7. After the &Source= string, paste in the URL for the home page of your SharePoint site.
    ContentType16
  8. Go to the end of the URL in your text editor and type &ContentTypeID=
  9. Return to the Library Settings page for your document library and click on the name of your first content type.
  10. Look at the URL for your page and find the string &ctype=
    ContentType17
  11. Place your cursor in the URL and copy the entire string of characters that follows the &ctype= string. This is the unique ID for your content type.
  12. Return to your text editor and paste your content type ID after the string &ContentTypeID=
    That’s it! You’ve now built a custom upload URL for your first content type. Here’s a picture of the end result. All the parts of the URL I customized are shaded in yellow:
    ContentType18
  13. Now it’s time to test. Copy your newly built URL and paste it an Internet browser window. Validate that you can upload a document, have it auto-tagged with its corresponding content type and that all your default column values work as expected. If the link does not work as expected, re-build your custom upload URL to make sure it is working correctly.
  14. Repeat steps 1-13 for EACH content type in your document library. In the end, you’ll end up with a unique upload URL for each content type.

Part 4: Creating your upload images

Now it’s time to build the images you want to use as your document upload buttons. Feel free to create the buttons in whatever program or design you like—just make sure that you end up with 1 image file for each upload button.

I opted to create the following circle images in PowerPoint. I right-clicked on each image in PowerPoint and selected Save as Picture to save each circle as a separate .PNG file.

ContentType19

Part 5: Adding upload buttons to your site’s home page

There are thousands of ways you can lay out and style your site’s home page. The steps below provide one suggested way of laying out your upload buttons. Feel free to customize.

  1. Go to your site’s home page.
  2. Click on the Edit link in the upper right-hand corner of the page.
  3. Click on the Text Layout button in your Format Text subtab and choose the One column with sidebar option.
    ContentType20
  4. Place your cursor at the top of your page’s sidebar. Select the Heading 1 style from the Format Text subtab and type Upload Center on your page.
  5. Hit the Enter key and type Click on a circle to upload a document. Your sidebar should now look like this:
    ContentType21
  6. Hit Enter again.
  7. Click on the Insert subtab and then the Table button. Add a table with 3 columns and 2 rows.
  8. Place your cursor in the left-cell of the upper row. You’re now ready to insert your first image.
  9. Click on the Insert subtab. If your images are already uploaded to your SharePoint site, select Picture > From SharePoint and select your first image. If your images are not uploaded to SharePoint yet, select Picture > From Computer and select your first image.
  10. Your image will now be displayed in your table cell. If you want to resize your image, change the Horizontal Size and Vertical Size settings on the Image subtab. Since my images were a bit large, I’ve resized them down to 100×100 pixels.
  11. Now it’s time to add the upload link to your image. Click on your image to select it. Then click on the Insert subtab and select Link > From Address.
    ContentType22
  12. Copy the upload URL you created for this content type and paste it into the Address box of the Insert Hyperlink dialog box.
    ContentType23
  13. Click OK to save your changes.
  14. Click on the Page subtab and click on the Save button to save your page.
  15. Now it’s time to test! Click on your first upload button and validate that you can successfully upload a document. Validate that the document gets auto-tagged with its corresponding content type and that all your default column values work as expected. If the link does not work as expected, re-build your custom upload URL to make sure it is working correctly.
  16. Repeat steps 9-15 to upload your remaining images and link them to your custom upload URLs.
  17. If you’d like to remove the gridlines from displaying around your table cells, edit your page, go to your Design subtab, click on Styles and select the Table Style 1 – Clear option.

Here is my page now:

ContentType24

Part 6: Building your document library views and navigation

You’ve now built an easy way for users to upload documents and have them auto-tagged with metadata. Now you need to consider how your users will browse for and find documents that have been uploaded. Will you build out views for each of your content types? If so, how will your users access these views?

I recommend creating new views and adding them as links on your site’s Quick Launch bar. The results may look like the example highlighted in yellow below. Of course, you can get more detailed and elegant in building out these document library views. The important thing is to provide your end-users with easy-to-click-on links that provide a queried short list of documents that meet their specific information need.

ContentType25

Credits:

A big thank you to Matthew Ruderman (SP_Geek) for serving as a technical editor on this post. Without you, Matt, these manually generated upload links would have looked awfully ugly…

7 comments

  1. Nice job! The nugget for me was Part 3. Love finding the clever URL uses in SharePoint. Once you have these, you can do all kinds of great stuff (link lists, etc.).

    Alternate container for O365 and SharePoint 2013: Putting those URLs in a Promoted Links list (I like your graphic approach better though).

  2. Hi Sarah, I have tried to adapt this to use in a List but unfortunately when trying to add columns to the content type one can only add from existing SITE columns, not the columns in the list itself – very limiting if one is trying to apply this to a pre-existing large list. Any ideas on a workaround for this? thank you! Di

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