If you're having a property named "UploadPdf" on your document type at a first sight this syntax seems to be correct but perhaps the reason for it not showing anything is that it's the syntax for the legacy XML schema?
Ok...then the reason why you don't get any output is probably because that the code you use is trying to match the old legacy schema used in older version of Umbraco before the release of 4.5.
This should give you a stack trace where you might get some information about what is going wrong by searching for a error description marked with red.
Try to do this to see if it gives you any information back.
Is there any difference in the extension call in the working example and the sample you posted previously? I'm a bit puzzled since these two lines seem to be identical...or maybe I'm turning blind :-)
Link to the PDF file stored in the media folder
Hi every body.
i stored a pdf file in media folder
like
media
> document
in document i am having pdf file..
i need to link that file in home page..
this is the xslt wht i written for that
i used the media picked property and that is UploadPdf
<xsl:value-of select="umbraco.library:GetMedia($currentPage/data[@alias='UploadPdf'], 0)/data [@alias = 'umbracoFile']"/>
i dont wheater is correct or wrong..
i got that stuff for umbraco.library..
write iam using hard coded stufff..
Hi Ardash
If you're having a property named "UploadPdf" on your document type at a first sight this syntax seems to be correct but perhaps the reason for it not showing anything is that it's the syntax for the legacy XML schema?
What version of Umbraco are you using?
/Jan
Hi Jan
The version of Umbraco which iam using is 4.7
Hi adarsh
Ok...then the reason why you don't get any output is probably because that the code you use is trying to match the old legacy schema used in older version of Umbraco before the release of 4.5.
Try using this code instead
<xsl:value-of select="umbraco.library:GetMedia($currentPage/UploadPdf, 0)/umbracoFile"/>
If you have problems using other XSLT examples that might be matching the old schema you can benefit from using this XSLT converter tool done by Tommy Poulsen - http://blackpoint.dk/umbraco-workbench/tools/convert-xml-schema-to-45-.aspx
Hope this helps.
/Jan
Thanks for reply Jan
i will try tommrow and if i have any doubts i will get back to you..
Adarsh
Hi Jan.
is just the one piece of code in need to write in XSLT or still i need to write more..
i am getting an error..
i tried all the option what are in the forum but no successfull..
Thanks
Adarsh
Hi Ardash
What kind of error do you get?
/Jan
Hi Jan
The error which iam getting is
Error parsing XSLT file: \xslt\Pdfdownload.xslt
i just created the xslt and written this code.
<xsl:value-of select="umbraco.library:GetMedia($currentPage/UploadPdf, 0)/umbracoFile"/>
and placed this macro in my template..
thats wht i did..
Thanks
Hi Ardash
Hmm, try doing this then...
If that does not help then try adding this querystring to your url in the browser address bar: http://yoursite.local?umbdebugshowtrace=1
This should give you a stack trace where you might get some information about what is going wrong by searching for a error description marked with red.
Try to do this to see if it gives you any information back.
Hope this helps.
/Jan
hi jan
<a>
This was i did and its works fine
thanks for your help Jan/
/Adarsh
Hi Ardash
You're welcome.
Is there any difference in the extension call in the working example and the sample you posted previously? I'm a bit puzzled since these two lines seem to be identical...or maybe I'm turning blind :-)
/Jan
hi Jan
i dont no really, iam a begineer for xslt i just tried all the option and finally got the solution
thanks for the support..
Hi Ardash
No worries, was just wondering.
You know where to ask if there is anything you have doubts about :-)
Have a great day.
/Jan
is working on a reply...