I have a regular, out of the box, list of type "Links". I have created a custom list that includes a lookup field to the URL field of the "Links" list.

I have created a custom xsl template file for rendering the lookup field on the views for the custom list, however, I do not know nor can I find how to actually render the value of the URL field (i.e. "http://google.com, Google") rather than a link to the item in the Links list.

Currently, the xsl looks like:

<xsl:template match="FieldRef[(@Encoded) and @Name='Link']" mode="Lookup_body" priority="1">
<xsl:param name="thisNode" select="./."/>
  <xsl:value-of select="$thisNode/@*[name()=current()/@Name]" disable-output-escaping="no" />

And it will render something like this:

<a onclick="OpenPopUpPage('http://<site>/_layouts/listform.aspx?PageType=4&ListId=
{4DA9F645-1E7B-4C8B-BA60-D49AB3B7B318}&ID=1&RootFolder=*', RefreshPage); return false;" 

I want it to render this:

http://google.com, Google

How can I accomplish this?

P.S. If anyone out there knows of a good reference for getting started with xsl rendering in SharePoint, I'd be grateful--I have no idea how to determine what variables are available with the "$thisNode" syntax, etc. and, thus far, have been unable to find a suitable introduction or complete reference.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.