Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Ok, so there are a zillion posts related to and circling around this question, but that do not actually answer it to my satisfaction.

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" />
</xsl:template>

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;" 
href="http://<site>/_layouts/listform.aspx?PageType=4&ListId={4DA9F645-1E7B-4C8B-BA60-
D49AB3B7B318}&ID=1&RootFolder=*">http://google.com</a>

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.

share|improve this question
    
nothing is better then MSDN for learning so check this out msdn.microsoft.com/en-us/library/ff604024.aspx for xsl rendering egrimmett.wordpress.com/2007/12/20/… –  SharePointer Sep 18 '12 at 8:01

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.