SharePoint Title Column DisplayName

sharepoint-2010

I'm creating a feature using XML for the definitions of fields, content types and lists. I'm not particularly interested in how to do what I want by either editing the view in designer or making changes to anything with code or PowerShell.

I created several content types which have the default "Title" column but in the content type definition, I specified a DisplayName of "Name". Great, that was easy!

So I create a list definition (and list instance) based on that content type using the Visual Studio 2010 item template and upon deploying, it shows "Title" everywhere… in the view, "Title" is the column name. When I go into new, edit or display forms, "Title" is the field label. Oh no…

So playing around with this for the better part of a day, I found if I specify within the Fields element of the MetaData element in the list definition, the "Title" field with a DisplayName of "Name" then it listens when it's drawing the forms for new, edit and display but when displaying a list, it still shows the column name of "Title".

In the ViewFields element, LinkTitle is the field being referenced and I've set the DisplayName attribute to Name and it's ignored. I also unsuccessfully tried the Alias attribute which doesn't seem to have any MSDN documentation other than "Optional Text" (awesome job guys).

Any ideas on the magical, XML to get the Title column in a list view to be displayed with a heading of "Name".

Best Answer

I finally found that if I explicitly include the LinkTitle in the Fields element of the MetaData element in the list definition and set the DisplayName attribute of the Field to "Name", that does what I was looking to do.

<Field Name="LinkTitle"
       ID="{82642ec8-ef9b-478f-acf9-31f7d45fbc31}"
       DisplayName="Name"/>