I have created an item template in ItemStyle.xsl to assign it to the CQWP.
My template is:
<xsl:template name="DepartmentsTemplate" match="Row[@Style='DepartmentsTemplate']" mode="itemstyle">
<xsl:variable name="DisplayTitle">
<xsl:call-template name="OuterTemplate.GetTitle">
<xsl:with-param name="Title" select="@Title"/>
</xsl:call-template>
</xsl:variable>
<a onclick="sayHello('{@Title}')"> <xsl:value-of select="@Department" disable-output-escaping="yes"></xsl:value-of></a>
</xsl:template>
Here the value I am displaying in @Department
is of type managed metadata field. It displays output like: Department 2|c98ce851-88fd-41bc-a013-4a69dd6bae66
but I want to display Department 2 only.
What should I do?