SharePoint 2010 & 2013 Group By Content Type

Posted by 5 Comments

SharePoint 2010 and 2013 no longer allow you to group a View by Content Type through the UI. However, you can still achieve this result with a little help from SharePoint Designer. Be aware that you still will not be able to sort by Content Type with this method. Also, if you make any changes to the View, your Group By settings will be reset and you will have to reapply the steps below.

  1. In SharePoint, begin by creating or modifying an existing View under Library Settings. In the Group By section, select any existing column to group on. Here I have selected the Created column:
    Modify View - Group By
  2. Be sure to save your changes. Next open the View in SharePoint Designer. You can get to it under the Lists and Libraries > [Your List/Library Name] > Views section as seen below.
    SharePoint Designer View List
  3. In the HTML of your View, find the GroupBy section that looks like the code below. Note that yours may look slightly different depending on which column you chose in the first step.
    SharePoint Designer Edit View
  4. On the FieldRef line, change the value of the Name property to ContentType. The GroupBy section should now look something like this:

    <GroupBy Collapse="TRUE" GroupLimit="30">
      <FieldRef Name="ContentType"/>
  5. Save the changes and you’re done. Your View should now be grouping by Content Type:
    Grouped By Content Type

Remember that any modifications to the View through the SharePoint UI will reset the GroupBy settings and you will have to make the change in Designer again.


Category: SharePoint

Comments (5)

Trackback URL | Comments RSS Feed

  1. Hasan says:

    Just use IE developer toolbar and on the modify view page inspect the first element (None) of group by drop down and change its value to tp_ContentType and text as ContentType, save changes and that’s it :-)

  2. Bert says:

    I tried this and it’s working well.
    But I also want to order this groupby list by the contenttype name.
    How can I do this?

  3. vas says:

    you are awesome
    thank you

  4. Tanel says:

    Worked smoothly, thanks!

Leave a Reply