Salvete! In my list, I have a column formatted as a Number, titled, say, "My Number", and the actual markup name of the column is "My_Number".
Now, I want to convert the entire column, in any list, into a hyperlink, so that the link becomes something like "My Number"
I have read here and here, and Microsoft's page, too, that this might be accomplished with xslt, but even after an iis reset, I can't seem to change the field values into the links that I want. Here is my custom fldtypes_MyNumber.xsl, which is placed in the /_layouts/XSL directory:
<xsl:stylesheet
xmlns:x="http://www.w3.org/2001/XMLSchema"
xmlns:d="http://schemas.microsoft.com/sharepoint/dsp"
version="1.0"
exclude-result-prefixes="xsl msxsl ddwrt"
xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime"
xmlns:asp="http://schemas.microsoft.com/ASPNET/20"
xmlns:__designer="http://schemas.microsoft.com/WebParts/v2/DataView/designer"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:msxsl="urn:schemas-microsoft-com:xslt"
xmlns:SharePoint="Microsoft.SharePoint.WebControls"
xmlns:ddwrt2="urn:frontpage:internal">
<xsl:template match="FieldRef[@Name='My_Number']" >
<xsl:param name="thisNode" select="."/>
<a target="_blank" href="/mypages/mysite{$thisNode/@My_Number}">{$thisNode/@My_Number}</a>
</xsl:template>
So what do I do to get this to work?
[UPDATE]
I changed mode=Number to mode=Number_body and now the hyperlink is generated and inserted properly! However, the hyperlink text label is rendered literally... How do I use the text that was originally there as a variable?