RSS

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

27 Mar

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: ,

2 responses to “Disable Person Link in Data View Web Part in Sharepoint 2010 & 2007

  1. mcccxhtml

    July 20, 2011 at 7:59 PM

    Thank you for posting this. This is exactly the code I was looking for. Congratulations for setting up a wonderful blog.

     
  2. swapna

    October 23, 2012 at 6:30 PM

    How to Disable the lookup column link.

    Regards
    Swapna

     

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: