I've got a SharePoint site collection with several sub sites each having their own document library. Now I want to add the file extensions to the document names in all those libraries. How should I do this?
I've seen tips telling you to modify the onet.xml-file, but they never look like mine do, and furthermore I don't know for sure what happens to that onet.xml-file - does it change the existing libraries? Other tips tell me to use SharePoint designer, that would mean I'll have to do it for every view in every library, wouldn't it? So I'd prefer doing it from code, where I feel more comfortable and where I can automate the process.
So, all I want is to replace the "Name (linked to document with edit menu)" with the "Name (for use in forms)" but still keep the link and the edit menu. I've found I need to use the FileLeafRef-field, but I don't know how!
You can follow below pts.
Reference Link : http://social.technet.microsoft.com/Forums/en-US/sharepointgeneral/thread/8222d979-f5ff-4665-a168-7245e4325b2f/
Or
Modify the display pattern in ONET.XML -
add Name="File_x0020_Type"/>
before
Name="Created_x0020_Date">
.
After making a change to ONET.XML you have to do IISRESET. (BEFORE ALTERING ONET.XML, PLEASE TAKE BACKUP).
If you need to do it for only one library, sharepoint designer is the way to go. You can convert the view to XSLT view and use the FileLeaFref field.
If you want to do it for all the libraries, there is no easy way. You can replace the Name column but if you want to display the link and edit menu as well, you will need to go with some Jquery hack which I believe nobody has done till now.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With