Hi all i'm trying to access a flash video for use in a lightbox and i need to set the href to being the location fo the flash video, so i want to use the GetMedia as i'm selecting the flash video using the media picker, however this seems to error, but not sure why!?
Why can't i do this?
Hi all i'm trying to access a flash video for use in a lightbox and i need to set the href to being the location fo the flash video, so i want to use the GetMedia as i'm selecting the flash video using the media picker, however this seems to error, but not sure why!?
Does it error when you are saving the XSLT or does it say there is a problem in the XSLT on the page?
If it does it when saving the XSLT, what is the error that it is giving?
Double check that the alias names are exactly correct (including case).
Names are definately correct, this is the error i get: System.OverflowException: Value was either too large or too small for an Int32.
Solved it by putting a if round it!!
<xsl:if test="$currentPage/data[@alias='flashVideo'] != '' ">
<p><a title="{$currentPage/data [@alias='caseStudyFlashVideoHeaderText']}"
href="{umbraco.library:GetMedia($currentPage/data[@alias='flashVideo'], 'false')/data[@alias = 'umbracoFile']}">
<xsl:value-of select="$currentPage/data [@alias='caseStudyFlashVideoHeaderText']" /></a></p>
</xsl:if>
You will need to wrap what you have in an if statement:
so that it doesn't error if you happen to put this macro on a page where it can't find the 'flashVideo' property.
good...you beat me to the answer.
is working on a reply...