When you use grouping in list views SharePoint adds the somewhat redundant field name over and over again for each group heading.
Often the group field is pretty obvious. We really don’t need to see Color, Color, Color.
To fix this requires SharePoint Designer…
- Create the grouped view in the browser as usual
- Open the site in SharePoint Designer
- Find the view file: “yourname.aspx”
- Double-click the file to open it for editing
- Display the Code view of the file
- Search for GroupByField
- Delete all of this text:
<GetVar Name="GroupByField" HTMLEncode="TRUE"/><HTML><![CDATA[</a> :&nbsp;]]></HTML> - Display the Design view and confirm that the change is what you wanted.
- Save the file
- Test in the site in the browser
Notes:
- Make sure you get all of the text above, and no more.
- This will remove all group by headings in the view. You can’t remove just one level.
- Using SharePoint Designer is always at your own risk! :-)
- Remember that you can always right-click an edited file in the folder list and select “Reset to site definition” to undo all of your changes.
- And finally, this is just a view. You can always delete it are start over.
The result should look like this:
.
9 comments:
I did a global search on the view page for the "GroupByField" field that you reference but I'm not able to find any references to it.
David,
Did you setup a view with grouping, then do the search from within the Code view of the page (the grouped view) in SharePoint Designer? The GroupByField will not show up in the source of the page delivered to the browser.
Mike
Worked perfectly thanks for this post. I'm now trying to figure out if I can remove the count for the grouping...not needed and redundant. So far I'm not seeing the '(X)' as a separate value being called - might be part of the GroupByValue
David,
Thank you! This works pretty slick.
I did notice that AFTER I make your suggested changes and if I go to make a change to the view, the groupbyfield field mysteriously reappears on the view but not in the code. Any tips on killing it completely?
Thanks!
Sarah
@Sarah,
I get the same problem. It did fix the problem the first time but later it came back but not present in the code view. Any ideas?
I have used this trick so many times! Thank you for posting.
This is a good article and works. However, is there a powershell way to do this because I have 100's of views across different sites and libraries.
Mike, I tried to use your technique in our SharePoint 2013 environment. I cannot find the offending code that you say to delete. I searched within the Code view of the grouped by page in SharePoint Designer, as you mentioned in a comment to another post. Has something changed in SP 2013 that would make your technique obsolete? Thanks for any info.
Anonymous,
I'm not surprised that it does not not work in 2013. Enough has changed in 2013 to break most of the customizations that worked in 2007 and 2010.
One day I need to revisit these customizations, there's only about 100 of them :-), and see if I can get them to work in 2013.
I now caution against customizations to 2013, especially Office 365, due to Microsoft's rate of change to the user interface.
Mike
Post a Comment