I am using Sharepoint 2010 Content Query Webpart(CQWP) to display a out of the box discussion board list on a page. I have customized the look of CQWP by changing the ItemStyle.xsl file. One of my requirements is to get a hyperlink on the CQWP - i have the format of the url, i need help to build the url with xsl variables.
Url Format:
https://yourdomain.com/sites/site_name/Lists/Team%20Discussion/NewForm.aspx?RootFolder={$DisplayTitle}&ContentTypeId=0x0107
In the above url format '{$Displaytitle}' is the topic of discussion board which i am getting it through xsl:variable. below is the code snippet which i used to get the topic.
<xsl:variable name="DisplayTitle">
<xsl:call-template name="OuterTemplate.GetTitle">
<xsl:with-param name="Title" select="@Title"/>
<xsl:with-param name="UrlColumnName" select="'LinkUrl'"/>
</xsl:call-template>
</xsl:variable>
<xsl:value-of select="$DisplayTitle"/>
now I am using the html anchor tag to get the hyperlink like
<a href="https://yourdomain.com/sites/site_name/Lists/Team%20Discussion/NewForm.aspx?RootFolder={$DisplayTitle}&ContentTypeId=0x0107">Link</a>
But the above is throwing an error and the whole CQWP is not getting display.