none
link the title column to the document in a document library SharePoint RRS feed

  • Question

  • I am looking for a solution to link the title column to the document in a document library.

    any solutions available. Please help!

    • Moved by Mike Walsh FIN Wednesday, March 31, 2010 1:53 PM admin q (From:SharePoint - Design and Customization (pre-SharePoint 2010))
    Wednesday, March 31, 2010 12:43 PM

Answers

  • I agree with Mike why take this approach if Name is already linked?  Maybe you can provide the actual business reason for it and then we can provide an alternative approach.

    With that being said you can use a content query web part, edit the XSLT to link the title column to the document in the document library and display this view in a separate page.  This will not change the List View page or the actual column names but rather provides the business (if that's where the request is coming from) a different view of the data.

    p.s.  Be very cautious when renaming or manipulating out of box columns given to you in a document library.

    • Marked as answer by Mike Walsh FIN Wednesday, March 31, 2010 4:46 PM
    Wednesday, March 31, 2010 2:36 PM

All replies

  • Why do you need this ? The Name column is always there and it already links to the document as does the icon.
    FAQ sites: (SP 2010) http://wssv4faq.mindsharp.com; (v3) http://wssv3faq.mindsharp.com and (WSS 2.0) http://wssv2faq.mindsharp.com
    Complete Book Lists (incl. foreign language) on each site.
    Wednesday, March 31, 2010 1:53 PM
  • I agree with Mike why take this approach if Name is already linked?  Maybe you can provide the actual business reason for it and then we can provide an alternative approach.

    With that being said you can use a content query web part, edit the XSLT to link the title column to the document in the document library and display this view in a separate page.  This will not change the List View page or the actual column names but rather provides the business (if that's where the request is coming from) a different view of the data.

    p.s.  Be very cautious when renaming or manipulating out of box columns given to you in a document library.

    • Marked as answer by Mike Walsh FIN Wednesday, March 31, 2010 4:46 PM
    Wednesday, March 31, 2010 2:36 PM
  • Here is an example of where it would be nice to have this working:

    Quotes document library.  Quotes will often arrive without freindly names 20010101XYZ.pdf, so you can add a column called "quote name" and see a friendly name such as "Contoso Quote", then having the Type icon linked to docuement.  Problems is that the icon does not seem to link to open document?

    The thing that I'm sure you will point out is why not rename the document?  This would be a fine solution, but will not currently work as you cant rename "Name" to "Quote Name" or add a description?

    any thoughts? or other options?

    Tuesday, June 22, 2010 5:34 PM
  • The correct answer to the original question is that it can't be directly done, or someone is afraid to address that.

    Mike and Kanwal: it's a bit obnoxious to immediately respond to a person's question with "Why would you do X?" when it has nothing to do with solving the problem. The poster clearly has a reason for asking the question to begin with.

    Personally I've had the same question in mind. It's for readability. Filenames shouldn't have special characters, spaces etc. Thus, it's better to use the title when you display a link. Think of any web link: you don't show a user "termsOfUse.html".. you show them "Terms of Use".

    All that said, Kanwal does provide a possible solution to the dilemma. A Data View Web Part will also handle this, but it takes a little more than a couple of clicks to get going.

    • Proposed as answer by PaminCambridge Thursday, April 12, 2012 3:54 PM
    Tuesday, July 20, 2010 9:28 PM
  • >Mike and Kanwal: it's a bit obnoxious to immediately respond to a person's question with "Why >would you do X?" when it has nothing to do with solving the problem. The poster clearly has a >reason for asking the question to begin with.

    This sort of personal attack is completely unnecessary. Neither Kanwal nor myself were at all "obnoxious" in our *on topic* replies.

    It is reasonable to ask why something odd is being asked when there already is a built-in solution to the problem. Perhaps the poster isn't aware of the built-in solution and in any case asking why he wants to do this helps the forum members to later provide an answer (if one exists).

    P.S. This appears to be your first forum post. Perhaps you should spend some time in the forums before attacking anybody. Both Kanwal and myself have provided lots of answers to problems in the forums as can be seen by our respective points scores.

     

     

     


    2010 Books: SPF 2010; SPS 2010; SPD 2010; InfoPath 2010; Workflow etc.
    2007 Books: WSS 3.0; MOSS 2007; SPD 2007; InfoPath 2007; PerformancePoint; SSRS; Workflow
    Both lists also include books in French; German; Spanish with even more languages in the 2007 list.
    Wednesday, July 21, 2010 4:02 AM
  • I would tend to agree with you. The first thing I tried to do with the view was use the title as a link to the document rather than the icon and/or name. Using the name is much like having the file name in a URL.  I find qustions like, "Why would you want to that?" unhelpful and a bit condensending. This is not a personal attack. This type of answer is wide spread.

    Many people are asking this same question and have provided solutions. Unfortunately, the answers are out of my reach since I do not have access to the designer.

    These appear to be reasonable answers to the question

    http://www.thesug.org/blogs/SharePointUnwrapped/Lists/Posts/ViewPost.aspx?ID=6

    http://suguk.org/forums/thread/18701.aspx

    http://msdn.microsoft.com/en-us/library/dd588100(v=office.11).aspx

     

    • Proposed as answer by Roberta Freese Wednesday, June 27, 2012 3:29 PM
    Monday, November 21, 2011 5:25 PM
  • Right on LentusLeo... the only thing more annoying than 'why would you want to do that?' is 'that can't be done' which seems to be a very common response here.
    Tuesday, August 28, 2012 7:52 PM
  • LentusLeo is spot on!! And I dont think it was a personal attack or anything. The technet.microsoft.com is becoming a bit of a joke. The only things I see here are:

    - MVPs (and their colleagues) accumulating points by marking the questions as 'answered' when in fact no answer was provided, just for status keeping sake.

    - people with a real interest in write more posts to their participation count by 'replying questions with other questions'. to increase their post count.

    Friends, 'MVP' does not mean 'knowledge' necessarily, it only means 'community focus/participation'. If their participation aggregates something valuable to the community, that's a different matter.

    Friday, October 11, 2013 3:30 AM
  • 1. You don't get points for marking answers. Marking an answer means the poster of the answer gets the points. 2. The forums show the present status of people - not what they were when they made the post. So as I don't think Kanwal Khipple was an MVP when he posted this isn't an example of an MVP (as I was at the time) giving another MVP some free points. I genuinely thought (as did at least one other in the thread) that the post from Kanwal brought us further. 3. I was against marking posts for status keeping sake and didn't do it myself. I'm with you on that. (I complained when others did so. (As noted I am now an ex-MVP - and ex-Moderator))

    SP 2013 "FAQ" (useful links): http://spf2013faq.mindsharp.com/default.aspx
    SP 2010 "FAQ" (useful links, book lists): http://wssv4faq.mindsharp.com/default.aspx
    WSS3/MOSS FAQ (FAQ; Books and Links) http://wssv3faq.mindsharp.com/default.aspx



    Friday, October 11, 2013 8:20 AM
  • This works perfectly - thank you so much! It's simple, I'm able to pass it along to my users - yes, it requires the extra steps of adding information to the properties and creating, or modifying, a new view (I don't know about your environment but, in mine, any additional work makes for not-very-happy campers) but the end result is more than worth it! Sometimes simple is the best - and most obvious.
    Best,

    Liz

    Monday, December 16, 2013 3:12 PM
  • Make Title column a link.

    Step By Step:

      • Create a webpart page and insert your library
      • Open page in SharePoint Designer
      • Right-click on the library and select “Convert to XSLT”
      • Find a Title in the code and wrap it with this url:

      titlelink

    1. Now you can delete the Name column: Common DataView tasks > Edit Columns.
    2. Save and preview-Title is now a link and no Name column!

    Wednesday, April 16, 2014 2:20 PM
  • I agree with Kanwal
    Wednesday, April 16, 2014 2:21 PM
  • I agree with this requirement, wholeheartedly. And, frankly, I'm rather shocked at the reactions I'm reading on this thread as I would expect most who are well versed in Microsoft products in general and SP specifcally to be able to differentiate between name (aka filename) and title.

    'Title' is an Office property, is actual metadata, and, as such, is searchable in SP whereas filename is not necessarily as readily searchable. As an IT business Analyst specializing in SP Information Management business solutions, filename to me and, in turn, my clients, is irrelevant. The key pieces are title, subject, author, and other site columns either ootb or custom that the business deems necessary.

    As such, I would prefer to not even bother presenting name (filename) in default library or list views. The only reason I do is that this is the only way to interface with the item Actions menu, other than through the Ribbon. The former method is preferable.

    Given the metadata relevance of the Title over Name (fielname) and its direct correlation to Office properties, I'm equally surprised that Microsoft hasn't recognized this and addressed it, linking Title to the document and enabling the Actions menu from it.

    Here's hoping that future iterations of SP address this.



    • Edited by Lionel Cole Wednesday, July 9, 2014 2:27 PM
    Wednesday, July 9, 2014 2:24 PM
  • Mike - Thanks for your service to the community. That said, I don't think the poster should be scolded by you for sharing their experience of your post.  How can you see this as a personal attack? The poster said they found the response a bit obnoxious.  They did not say they found you to be obnoxious.  The poster then cited a legitimate reason why a link to another column would be useful.  One tip that my brother shared with me yesterday, is to use the phrase "How would that be better?". Starting with "Why do you need to do that?", carries an implied meaning that can put some people off.

    I know this is a super old thread, and I shouldn't bother posting to it. But here I am doing it anyway.  I came to this thread because a user was asking me how to do this in Office 365 SharePoint Online and I wanted to see what useful tips there were out there for assisting them.

    Cheers - Greg

     

    Gregory Frick

    Monday, March 23, 2015 10:10 PM
  • This is not an answer, its a work around using content query web part which has completely different functionality than what is requested.

    Scroll down over to the answer provided by Sujit Sukumaran MCP. That will point you in the right direction. Samsang, if you're still on this thread I suggest unmarking this as an answer.

    Thursday, October 1, 2015 6:41 PM
  • Hi All,

    Since I faced a similar situation and somehow I was able to solve it.

    I know this is a very old post, but still would like to answer this one. This might help some one who is still looking for the answer.

    This might be a bug in SharePoint 2013 since Type column (linked to document) is not opening the document instead it is highlighting the column and doing nothing.

    My business scenario was:- we had columns in our document library viz. Name, SeqID.

    The name column was a default column and user did not want this column in the views. But since Name column was default and it had link to the document, it was very difficult to remove it. and if we remove then from where would the user open the document? User was also not ready to open the document from the ribbon.

    So started working on this, while working came to know the Document ID Value. This Document ID value is generated automatically by SharePoint with Library ID and library item id suffixed to it.

    I also observed that this Document ID Value can be used to open the document and it is pretty useful.

    So thought of using this Document ID Value and assign this value to my custom column "SeqID" for opening the documents.

    So now created a new calculated column in the library and assigned it the formula as below:-

    =CONCATENATE("<a href='http://../sites/../_layouts/15/DocIdRedir.aspx?ID="&[Document ID Value]&"'>"&[SeqID]&"</a>")

    Where SeqID is one of the column in library.

    Here I have assigned the Document ID value to one of the columns in library and hyperlinked it to open the document.

    So now my view does not have Name column and I have another column which is hyperlinked to open the document.

    Reference links which I used were:-

    https://devdotnotes.wordpress.com/2012/01/29/sharepoint-caculated-column-and-hyperlink-no-workflow-or-script-needed/

    https://tjendarta.wordpress.com/2013/07/16/sharepoint-calculated-url-column/

    https://social.msdn.microsoft.com/Forums/office/en-US/be8017ff-bf8f-4c24-a5ff-11a03ff57e7b/type-icon-linked-to-document-not-working-in-sharepoint-2013?forum=sharepointcustomization

    Thanks & regards,

    Manish


    Saturday, October 17, 2015 2:10 PM
  • How about this custom WSP inCodeplex

    Document Icon Link for SharePoint 2013

    Give me your idea about this please.

    Thursday, January 28, 2016 7:30 AM
  • I realize this is a very old thread, but I recently had this very issue with a SharePoint 2013 doc library where I wanted to NOT display the [Name] field, as it is ugly, and it should just remain the filename.

    This can be done with no javascript, no webparts, no extra queries:

    In this example, I want the [Title] column to be my hyperlink.  I also want the document icon [Type] to be clickable.  This is necessary on some views such as Shaded or Newsletter, especially when using grouping.  The default views automatically allow the filetype icon to be clickable, but in my case, I want the Title field to also contain the dialog menu.

    1. Create a view that you would like the users to see (example: byReleaseDate.aspx)
    2. Edit the view in SPD (Lists and Libraries > Library > Views > byReleaseDate.aspx)
    3. Find <FieldRef Name="Title"/> and change it to <FieldRef Name="Title" ListItemMenu="TRUE" />
    4. Now find the icon field <FieldRef Name="DocIcon"/>
    5. Change it to <FieldRef Name="DocIcon" LinkToItem="TRUE" />
    6. Save the page/view in SPD, and refresh your web page.

    It is worth noting that ListItemMenu and LinkToItem are extremely case sensitive, so they must be typed exactly as I have.



    • Edited by J. Campey Wednesday, February 17, 2016 4:13 PM
    • Proposed as answer by TOV365 Friday, August 26, 2016 8:59 PM
    Wednesday, February 17, 2016 4:11 PM
  • I was want to reply on why I need links on title instead of the name column.

    In practice, we always have file names in English, which will not cause <g class="gr_ gr_220 gr-alert gr_gramm gr_run_anim Grammar only-ins doubleReplace replaceWithoutSep" data-gr-id="220" id="220">error</g> in encoding. 

    and we will use _ or - so that the links to the file will not be broken in any case.

    However, these name may not be <g class="gr_ gr_359 gr-alert gr_gramm gr_run_anim Grammar only-ins doubleReplace replaceWithoutSep" data-gr-id="359" id="359">proper</g> name for displaying what the file is.

    say I have <g class="gr_ gr_419 gr-alert gr_gramm gr_run_anim Grammar only-ins doubleReplace replaceWithoutSep" data-gr-id="419" id="419">Annual</g> report for China 2016. My file name would be Annual_report_for_China_2016.pdf

    The title for it should be 中國年報 2016. 

    in this case, I have to display both title, names (just to link to the doc), and other metadata!

    Wednesday, November 9, 2016 8:38 AM
  • Thanks Manish - this is JUST the ticket - something a power user can do - no coding no spd - just a solutino to a simple and common requirement - Why would I want to show someone the "name of the file" I want to show them the "title" the actual Pretty descriptive name - but then yes - linki to the filename

    the same reason an href has the option to show the Link as a sentnce or phrase - not as a URL

    Thursday, April 20, 2017 8:27 PM
  • Yes, this is still an issue... Why do I need it? Because the "look-up" column type only allows linking to the TITLE; not the NAME. Therefore, when users live/die by the Name and you try to link a list item to a document you have to require users to enter the same information into both the TITLE and NAME fields.

    That is not an "out of the box solution."

    MS needs top either allow us to choose the fields by which we link items and documents via "lookup" or they need to allow us to determine what field can be "(linked to document with edit menu)."

    Kanwal & Mike: "you don't need this" is not an answer gentlemen.

    Thursday, July 27, 2017 9:59 PM
  • Bless you, J. Campey, for this post. I have one very small, but very important thing to add.

    If you're using SharePoint 2013, use linkToItem not LinkToItem (lowercase the "L" in "link").

    I found this tip here: https://sharepoint.stackexchange.com/a/111009

    Tuesday, February 20, 2018 8:29 PM
  • I agree. Microsoft needs to address this.
    Friday, February 23, 2018 3:24 PM