Stack Overflow is a community of 4.7 million programmers, just like you, helping each other.

Join them; it only takes a minute:

Sign up
Join the Stack Overflow community to:
  1. Ask programming questions
  2. Answer and help your peers
  3. Get recognized for your expertise

There is a List with Lookup field. And there is a CQWP web part which uses this list as a Source and uses custom XSL style added to Itemstyle.xsl. And there is a problem how to render this field as a link?

Field name is 'Category' and

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

Returns a string with item's title (like 'Some Category'). But I need a URL or ID. Any suggestions?

share|improve this question

Try something like this :

<a>
    <xsl:attribute name="href">
        <xsl:value-of select="@Url" />
    </xsl:attribute>
    <xsl:value-of select="@Category" />
</a>
share|improve this answer
    
Did you try? If it does the trick please validate. – Cana Jun 10 '13 at 12:07

Use disable-output-escaping, for example:

{less than symbol}xsl:value-of disable-output-escaping="yes" select="@Category" /{greater than symbol}
share|improve this answer

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.