RSS

Tag Archives: Presence

Disable Person Link in Data View Web Part in Sharepoint 2010 & 2007


When displaying the column @Author in a Data View Web Part (DVWP) SharePoint displays a link to the UserDisp.aspx page.

If you don’t want to have the link just extract the Person’s name from the column HTML generated code.

Just replace:

<xsl:value-of disable-output-escaping=”yes” select=”@Author”/>

By:

2007
<xsl:value-of disable-output-escaping=”yes” select=”substring-after(substring-before(substring-after(@Author, ‘ID=’), ‘&lt;’), ‘&gt;’)”/>

UPDATED:

Here is the code for Sharepoint 2010 version

<xsl:value-of disable-output-escaping=”yes” select=”substring-after(substring-before(substring-after(@Author, ‘ID=’), ‘&lt;’), ‘&gt;’)”/>
Advertisements
 
2 Comments

Posted by on March 27, 2011 in Sharepoint Designer, Tips & Tricks

 

Tags: ,