Saturday, January 21, 2017

How to rename the Title field in a list/library using PnP templates

Took me some testing to get this right, but turned out not that hard. You add a reference to the Title field with the out-of-box id fa564e0f-0c70-4ab9-b863-0177e6ddd247, and then change the display name. In the sample below I’m also using a reference to a language resource as I need support for four languages.

<pnp:ListInstance Title="My List" TemplateType="100" Url="Lists/MyList">
        <Field ID="{fa564e0f-0c70-4ab9-b863-0177e6ddd247}" Type="Text" Name="Title" StaticName="Title" DisplayName="{resource:MyList_MyTitle}" />