Tuesday, December 14, 2010

Change View headers in SharePoint 2010

For changing the view Headers you need the SharePoint 2010 Designer.

To start modifying your view select the “Edit List in SharePoint Designer” or simply open the designer and navigate to your list

SNAGHTML1ee2bedd

Click on the placeholder that has the View Web part to enable the ribbon tools.

SNAGHTML1ee7bfb8

Click List View Tools –> Design, and Choose Customize XSLT – Customize Entire View,  to enable editing of the xslt.

SNAGHTML1ee9f394

Click on a header, and replace the xslt in the codeview. The default xslt will be <xsl:value-of select="$fieldtitle"/> replace with something like <xsl:text disable-output-escaping="yes">Your new header</xsl:text>

Now for the important part:

You must remove all ddwrt:ghost="hide" attributes in your view. If these attributes exists the view will not be correctly saved. Do a search replace and save the “file”.

Before:

SNAGHTML1ee50b29

After:

SNAGHTML1ef12b85