Use a friendly URL in a Sharepoint list display

Is your URL waaaaaaaaay too long for your display form (usually dispform.aspx) in Sharepoint 2010? This is an easy fix.

Step 1:
Create a new display form for your list item in Sharepoint Designer

Step 2:
Find your URL field. My URL is a link to the mysite of a person.

Step 3:
Create a new variable, wrapping what is currently there as your xsl item.

So in my case, I replaced this:

<xsl:value-of select="@MySiteLink"/>

with this:

<xsl:variable name="linktomysite">
  <xsl:value-of select="@MySiteLink"/>
</xsl>

Step 4:
Finally, call the variable in a nice short, user-friendly link

< a href="{$linktomysite}">MySite Profile</ a>

About bentedder

Ben Tedder is a front-end web developer. He loves WordPress, SharePoint, and Drupal, along with jQuery, CSS, and good 'ol HTML. +Ben Tedder on Google or follow @bentedder

Join the discussion!