1

I have been struggling with this one for a couple days and figured it was time to ask for some help. I'm not sure if this is right forum, so if not please point me in the right direction.

Does anyone have a very simple XSL code that shows how to link a Title to it's document?

I have: - SP MOSS 2010 - A large document library (6500 documents in 15 folders) - Documents tagged with the "WorkCode" they belong to - A web part page stored in a serate library - A library web part that is filtered based on the "WorkCode" coloumn. (this webpart shows Type, and Title, plus two more custom columns) - Some coding skills with JS, CSS, HTML and XSL (bare minimum)

I do not have: - Access to SP Designer - An IT department that is willing to modify anything on the server side (or learn xsl)

My problem: SharePoint no longer links the Type icon to my documents(due to SP upgrade to 2010?) My filenames are terrible, so I want to link to the document Title instead of dispaying the Name. I have tried to make my own XSL file to link to from the web part's "Miscellanous" section. I can get the Title to appear, but I can't figure out how to get the hyperlink to the document.

This is some code I copied from: http://blogs.captechconsulting.com/blog/chris-okeefe/sharepoint-2010-add-%E2%80%9Clinked-titles%E2%80%9D-document-based-list-view-web-parts It links the Title, but the links all point back to the webpart page directory, and not the actual document.

<xsl:include href="/_layouts/xsl/main.xsl"/> 
<xsl:include href="/_layouts/xsl/internal.xsl"/> 

<xsl:param name="AllRows" select="/dsQueryResponse/Rows/Row[$EntityName = '' or (position() &gt;= $FirstRow and position() &lt;= $LastRow)]"/>
<xsl:param name="dvt_apos">'</xsl:param>

<xsl:template name="FieldRef_Text_body.Title" ddwrt:dvt_mode="body" match ="FieldRef[@Name='Title']" mode="Text_body" ddwrt:ghost="" xmlns:ddwrt2="urn:frontpage:internal">
    <xsl:param name="thisNode" select="."/>
    <xsl:choose>
        <xsl:when test="@AutoHyperLink='TRUE'">
            <a href="{$thisNode/@FileLeafRef}"><xsl:value-of select="$thisNode/@*[name()=current()/@Name]"/></a>
        </xsl:when>
        <xsl:otherwise>
            <a href="{$thisNode/@FileLeafRef}"><xsl:value-of select="$thisNode/@*[name()=current()/@Name]"/></a>
        </xsl:otherwise>
    </xsl:choose>
</xsl:template>

I'm going nuts trying to figure this out!

Thanks in advance!

Curt
  • 11
  • 1
  • 2

0 Answers0