2

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?

Serhiy
  • 4,357
  • 5
  • 37
  • 53

2 Answers2

0

Try something like this :

<a>
    <xsl:attribute name="href">
        <xsl:value-of select="@Url" />
    </xsl:attribute>
    <xsl:value-of select="@Category" />
</a>
Cana
  • 2,204
  • 1
  • 13
  • 12
0

Use disable-output-escaping, for example:

{less than symbol}xsl:value-of disable-output-escaping="yes" select="@Category" /{greater than symbol}
Sabel
  • 559
  • 9
  • 14