I have one Media Picker in the document type ..... i will select one pdf file using that media picker which is there in the media library..... i want to open that file in new windows using xslt ....how to do that ?
Basically... relatedDocumentsList is the media picker property alias on your docType... we check to make sure it has a value... then we do something with it. Hope that helps.
I dident understood what you did in this code...but its not working for me ....
I have one media picker (alias name : pubSelectfiles ) .... i will choose one file (lets say i will choose pdf file) form media library using that media picker....
I want to open that selected file in new windows using xslt .....how to do that?
<xsl:template match="/"> <xsl:for-each select="$currentPage/*[@isDoc and string(umbracoNaviHide) != '1']"> <br/> <div id="pubSection"> <div id="pubSectionHeader"> <xsl:value-of select="@nodeName"/> </div> <xsl:for-each select="././*[@isDoc]"> <div id="pubArticle"> <div id="pubImage"><img src="{./pubThumbnail}" alt="" width="115px" height="90px"/></div> <div id="pubContentArea"> <div id="pubHeader"><xsl:value-of select="pubHeader"/></div> <div id="pubContent"><xsl:value-of select="umbraco.library:TruncateString(umbraco.library:ReplaceLineBreaks(pubContent),190,'')"/> <xsl:if test="string-length(umbraco.library:ReplaceLineBreaks(pubContent) > 65)"> <!-- only show the link if truncated? --> <!-- Here i want to show the link from where that file will open in new window --> </xsl:if> </div> </div>
Help with media picker
Hi,
I have one Media Picker in the document type ..... i will select one pdf file using that media picker which is there in the media library..... i want to open that file in new windows using xslt ....how to do that ?
I did tried this
<a target="_blank" href="{pubSelectfile}"> >> </a>
but some how it is not working for me ....
what to do ?
you will need to have an xslt macro or inline xslt to get the media item link [umbracoFile]
here is a snippet tht should point you in the right direction... this snippet actually lists a folder of documents from media...
if you only need to list one... it would be modified like this..
Basically... relatedDocumentsList is the media picker property alias on your docType... we check to make sure it has a value... then we do something with it. Hope that helps.
Hi
I dident understood what you did in this code...but its not working for me ....
I have one media picker (alias name : pubSelectfiles ) .... i will choose one file (lets say i will choose pdf file) form media library using that media picker....
I want to open that selected file in new windows using xslt .....how to do that?
Hi vaibhav
From bob's example just remove relatedDocumentsList by your alias name pubSelectfiles. Then it should works as you want.
Thanks
Pnima
Hi,
I still cant understood it....Here is my code ...can u help to put that in this
There is no one who can help me ?
Hi there you could try something like that if you want to use a macro
is working on a reply...