I have added a media picker item to my Document Template and am now trying with xslt to get it to render the file name (ex.: "MyUploadedPdf.pdf") and not the url of the file instead if my link text "Download/se PDF" but no luck... any ideas?
The @nodeName would return the name the file when you created it in the media library. Not the name of the PDF file, but the name of the item in the media library. e.g In the case the @nodeName will returns My PDF.
Media picker File name not URL
I have added a media picker item to my Document Template and am now trying with xslt to get it to render the file name (ex.: "MyUploadedPdf.pdf") and not the url of the file instead if my link text "Download/se PDF" but no luck... any ideas?
My xslt for now:
Hi Crawn,
Try this one:
Hope this helps,
/Dennis
Hi Crawn,
Okay so you want the node name in your link and not the url to the file right?
Try this one:
/Dennis
Hi Dennis...
i'm trying to replace the "Download/se PDF" with the file name (ex. mypdf) without file extention (.pdf) and not the URL (media/45120/mypdf.pdf)...
So the end result is: <a href="media/45120/mypdf.pdf">mypdf</a>
Cheers
/Crawn
Hi Crawn,
Okay then try this one:
/Dennis
Hi Dennis
If i remove the "}" after @nodeName in your code i just get "Error parsing XSLT file: \xslt\Listfiles.xslt"
But as far as i can see this should do it :(
Cheers
/Crawn
Hi again
...but the again @nodeName wont that just output the name of the page?
Cheers
/Crawn
Hi Crawn,
This code should work just file assuming that you not in a for-each loop.
The @nodeName would return the name the file when you created it in the media library. Not the name of the PDF file, but the name of the item in the media library. e.g In the case the @nodeName will returns My PDF.
I hope this will work for you and helps you.
/Dennis
How about
with a space between value-of and select...
is working on a reply...