2

I have implemented a list of products, with multiple views.

I would like to change the displayed name of a column title in one view only. At the moment it displays "Product Name" and I would like to change it to "Customer". I don't want to change the underlying list structure (this always seems to be the end result of my internet searches) - all I need is for this one column name to be different in this view.

I thought this would be simple - making the following change in the view's .aspx file.

-From-

FieldRef Name="LinkTitle"/>

-To-

FieldRef Name="LinkTitle" DisplayName="Customer" />

Unfortunately, this did not work because at this level I believe the attributes are read only.

How do I make this change in SharePoint Designer 2013? Can this change be done in the .aspx file? In terms of my abilities I would classify myself as a soon to be extinct SharePoint super user, with some historical development skills.

I've made this change before in Designer 2010, but I'm stuck now because I'm forced to use SharePoint Designer 2013, even though my front-end UI is still at 2010. Like a lot of SharePoint Online customer's, we are waiting for Microsoft to finish the updating of our system. Consequently, our backend is 2013, while our front-end is 2010.

Any help, with examples would be highly appreciated. Please take into account my limited development skill base. If this change can be done via inserting some css I would really be happy! But if it requires code I'm more than willing to try! :-)

Thank you for your help in advance,

Alex

2

This could not be done with CSS but should be possible with either XSLT or jQuery. To change in XSL:

  1. Navigate to your view in SPD via All Files/Lists
  2. Edit in Advanced Mode
  3. Make sure your mouse is inside the web part and in the List View Tools->Design ribbon select Customize XLST-> Customize Entire View
  4. Search for the template called FieldRef_header.LinkTitle
  5. Delete the attribute ddwrt:ghost="hide" from this template
  6. Scroll down a few lines to find the following:

<xsl:with-param name="fieldtitle"> <xsl:value-of select="@DisplayName"/> </xsl:with-param>

Change the above to the value you want to see:

<xsl:with-param name="fieldtitle"> <xsl:value-of select="'Customer'"/> </xsl:with-param>

Save the file - you may get a warning that it will no longer be based on the site definition - just continue.

That is done. This specific view should now show the Title column as Customer.

  • Hi David, thanks for the above. One quick question - will the above solution work via SharePoint Designer 2013? Thanks - Alex – Alex Jun 30 '13 at 21:48
  • It certainly will. Good luck. – Dave Paylor Jul 1 '13 at 8:50
  • Hi Dave, the above resolved the Column title issue - thank you. One thing - when selecting the column filter it still says "Clear filter from Product Name". Is there any way to change this to "Clear filter from Customer" without changing the list column name? Thanks again. – Alex Jul 3 '13 at 11:49
  • Hmmm - I am guessing that will be applied with JavaScript so it could well be getting the details directly from the list. – Dave Paylor Jul 3 '13 at 20:29
  • Thanks - Although my initial question was answered - the filters were a different problem, which I haven't been able to resolve. Thanks again for your help. – Alex Jul 16 '13 at 21:49
1

A real cheap and dirty way to change a list column name is to create another column in the list with the name that you want to use. Set this new column to be a "calculated" column based on another column. Then set that column to equal the old column. You can then display the new column instead of the old column. The other advantage to doing this is that you will not mess any workflows that reference the old column.

In your case, create a new calculated column called "Customer" and set it equal to "Product Name"

0

Why not attach a Client Side Render JS to that view, and then just use the render to change the title of the column?

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.