override Item title

i’ve been working on some custom content types, and could never find the exact answer to my question until i tried a few different tricks. i have come to discover that overriding the Title column on the base content type, Item, is really not a good idea unless you’re delivering a CAML-based solution.

why do you want to override it?

my main reason for overriding the Title column (display) name is the functionality that’s included in the Title column, which i’ve not been able to recreate. here’s a screenshot of the functionality i’m talking about:

linked to item with edit menu

basically, it was a preference of allowing the user to be able to “click to edit” on the primary field of my list. unfortunately, i have not found a way to do this without writing a CAML feature. while a CAML-based feature is not out of the question, it’s not necessary in some cases where a simple, out-of-the-box solution meets the need of the business.

what’s the problem?

you can override the display name of the Title column without impacting basic functionality in Sharepoint. it’s noted in many places that you don’t rename the actual column, but only change the display name whenever you edit the column name. however, there are two different approaches to doing this.

do tell…

the first approach is via Site Settings, which is basically Sharepoint configuration. the problem with this approach is that overriding the Title column name via the Sharepoint configuration screens (Custom Content Type > Title Site Column on the Item content type) overrides the Title column on the Item content type. when you override that column on the Item content type, it impacts ALL content types (unless the CAML is explicitly defined for it) that inherit from Item.

the second approach is via CAML. you can provision a content type in CAML and override the column display name. apryl crossland has a great post about doing this. by doing it in the CAML definition, the change occurs exclusively on that content type instead of on the site column on the Item content type. here’s a sample of the CAML.

<FieldRef ID="{fa564e0f-0c70-4ab9-b863-0177e6ddd247}" Name="Title" DisplayName="Request Title" Required="TRUE" />

however, this requires an upload to the Sharepoint site (preferrably via a solution package–see my post on creating solutions). when this is the only part of the customization that requires CAML, you may want to opt to simply use the Edit button column that’s typically provided (what i’m doing for my solution).

override Item title
Tagged on:         

Leave a Reply