I am creating a custom content request web part to display collapse information from an employee content type. This type of content has an image publishing site column called EmpPhoto. My CQWP works fine, and all the site columns available to me are available.
Now I am creating my own xsl template to display information correctly, but am stuck using EmpPhoto image.
If I use the code:
<xsl:value-of select="@EmpPhoto" disable-output-escaping="yes" />
... I get a properly designed image that is great. However, I want to create an onmouseover event for this image, and this approach will not work.
I thought to create an xsl variable to capture the actual URL of the image, and then create my own html-img and write onmouseover to this, for example.
<xsl:variable name="EmpPhotoUrl">
<xsl:call-template name="OuterTemplate.GetSafeStaticUrl">
<xsl:with-param name="UrlColumnName" select="@EmpPhoto"/>
</xsl:call-template>
</xsl:variable>
...
<img src="{$EmpPhotoUrl}" onmouseover="" alt="test" />
This does not get the URL from the EmpPhoto site column. I'm new to xsl, so I might miss the obvious solution!
Any help is greatly appreciated
Johnny
Jonny source
share