0

What would be a best practice concerning the Title field that gets added when creating a custom list based on a custom content type? The custom content type inherits Item, but is set with Inherit="FALSE" in order not to inherit the column Title. Also, in the list definition, I remove the field "Title". The problem is that in views, I cannot set another column to have the context menu or the link to the display form. Also tried setting the LinkToItem="TRUE" property on the field in the custom content type to no avail.

0

I'll answer my own question:

What I've done was manually add the following three columns in the list definition, in order to rename the Title field (keep the same IDs as they correspond to the Title field):

<Field Name="Title" ID="{fa564e0f-0c70-4ab9-b863-0177e6ddd247}" DisplayName="NewName" Sealed="TRUE" Type="Text"/>
<Field Name="LinkTitle" ID="{82642ec8-ef9b-478f-acf9-31f7d45fbc31}" DisplayName="NewName" Sealed="TRUE" Type="Computed"/>
<Field Name="LinkTitleNoMenu" ID="{bc91a437-52e7-49e1-8c4e-4698904b2b6d}" DisplayName="NewName" Sealed="TRUE" Type="Computed"/>

and in the content type, just omitted this renamed field. Then I chose to use the content type in the list (Visual Studio) to populate the fields and then delete it back so the list is not based on the content type anymore.

LinkTitle and LinkTitleNoMenu are needed for the rename to work in views. They are used as the title field with context menu, respectively the link with no context menu.

So this should work fine as long as you don't need multiple content types for the list.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.