none
Document Library Web Part -> link to DispForm.aspx RRS feed

  • Question

  • Hi there. I'm trying to solve a problem that appeared when I tried to create a simple page with the list of documents from my document library. I need Title field displayed as a hyperlink to DispForm.aspx, not to Document itself, and not to a dropdown menu with Edit option.

    The reason of this requirement is that we don't like to allow users to download document w/o reading metadata assosiated with it. On the other hand, ordinary user must not see Edit links in menu, because we don't want to tempt them to try edit document at all.

    Of course, I can customize the data view in Sharepoint Designer - go to Code View and manually change <xsl:value-of select="@FileRef"/> to something like ..../dispform.aspx?ID=<xsl:value-of select="@ID"/>. But this ways seems to mee a bit ugly and I don't like to repeat this for each and other document library.

    Is there any elegant way to solve the problem?

    Thanks.

    Thursday, January 25, 2007 3:28 PM

All replies

  • With SharePoint 2010 there is a new default column for views Name (Link to display item) or Name (Link to Edit item)
    Wednesday, March 7, 2012 10:16 PM
  • If you are working in MOSS 2007 then a more elegant way would be to create your custom document library definition.

    You need to go to the 12 hive --> features --> document library list definition.

    Create a copy of this list definition and modify it so that the document name points to the dispform.aspx.

    Install and activate the new feature and create document libraries using your new template.

    And the other part of not showing the edit item options can be achieved using sharepoint permissions. Why create something custom for that?


    Regards, Huzefa Mala, MCTS

    Thursday, March 8, 2012 6:31 AM
  • Dear Kunal,

    I don't see that field Name(Link to display Item), is it specific to SharePoint 2010? I am using SharePoint 2013.

    Regards

    BK


    Kesava

    Tuesday, February 3, 2015 10:17 AM