I am trying to modify the display of a library column header to show a different name than the default name. The column I am trying to change is the “LinkFilename” column which is the column that links to the actual document. The default display name for this column is “Name” and I want to change it to something more user-friendly like “Form Name”.
For this library named “Administration Policies” (actually I need to change this on all my policy libraries), I created a custom view called “PolicyView” which I show as a screenshot from SPD below.
I open the PolicyView in “Advanced Mode” and modify the <XmlDefinition> as shown below:
<XmlDefinition>
<View Name=”{C1E366E6-CF67-410B-8577-23E094E43FC3}” DefaultView=”TRUE” Type=”HTML” DisplayName=”PolicyView” Url=”/policies/Administration/Forms/PolicyView.aspx” Level=”1″ BaseViewID=”1″ ContentTypeID=”0x” ImageUrl=”/_layouts/15/images/dlicon.png?rev=23″ ><Query><OrderBy><FieldRef Name=”LinkFilename” Ascending=”False” DisplayName=”Form Name”/></OrderBy></Query><ViewFields><FieldRef Name=”DocIcon”/><FieldRef Name=”Title”/><FieldRef Name=”LinkFilename” DisplayName=”Form Name”/><FieldRef Name=”RevisionDate”/></ViewFields><RowLimit Paged=”TRUE”>101</RowLimit><JSLink>clienttemplates.js</JSLink><XslLink Default=”TRUE”>main.xsl</XslLink><Toolbar Type=”Standard”/></View></XmlDefinition>
</WebPartPages:XsltListViewWebPart>
Am I working in the right direction? When I save the PolicyView.aspx file and refresh my browser I do not see any of the changes.
Thanks,
Alex
?width=750
JSLink is harder, you have to remake the entire header row for the view. The bonus is that if you have multiple views, you can change the wording on a per view basis.
To start with templates, take a look at the raw template project SPCSR: https://github.com/SPCSR/DisplayTemplates
I am still troubled by the fact that I have to manually to into these file one-by-one. Is there a better way to solve this issue? How would it be done using JSLink?
I just made a change at it appears to work. I feel like a real “twit” if this is a good fix and I didn’t see it before.
I clicked on the “Customization” under the “Administration Policy” list as shown below to “edit list columns”
Then I renamed the “Name” column to “Form Name” and saved the file.
This seemed to have done the trick … as shown in the following screenshot
Â