Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Can anybody see whats wrong with this
<xsl:variable name="media" select="umbraco.library:GetMedia(/macro/imageID, 0)" /><img src="{$media/umbracoFile}" />
the macro throws an error...
If i do a simple
<xsl:value-of select="/macro/imageID"/>
i get "/media/41/suni.gif152793150gif" so there is data present inside the scope...
Hi Claus,
Looks like it's a "mediaCurrent" variable, right?
Those already return the XML, so you can just do:
<xsl:variable name="media" select="/macro/imageID" /> <img src="{$media/umbracoFile}" />
/Chriztian
Yes, its a mediaCurrent, but it still doesnt work for some reason...
when doing a <xsl:copy-of select="$media/umbracoFile"/> i get nothing
<xsl:copy-of select="$media"/> returns /media/41/suni.gif152793150gif ?!? strange...
Hi Claus
But isn't it the path that you need? Then you will just need the $media variable, right?The output looks like you're using the "upload" datatype on your page...and then I guess it all makes sense (if i'm right off course :-))
/Jan
I also had this problem. Somehow I had a problem with putting it into a variable, but getting it directly worked:
You could try something like this:
/macro/imageID/Image/umbracoFile
Now you get the value directly from the macro instead of the variable. Worked for me.
Jeroen
Thanks Jeron, that worked
Ah ok - might be getting more than we asked for, so to speak - what does this give you:
<xsl:copy-of select="/macro" />
Hopefully something along the lines of:
<macro> <imageID> <Image> <umbracoFile>/media/41/suni.gif</umbracoFile> <umbracoWidth>...</umbracoWidth> <!-- More image properties --> </Image> </imageID> </macro>
i get
<macro> <link>1064</link> <imageID> <Image id="1076" version="d11a7686-c0c7-4124-856a-311d62dc65aa" parentID="1075" level="2" writerID="0" nodeType="1032" template="0" sortOrder="1" createDate="2010-11-23T11:43:19" updateDate="2010-11-23T11:43:18" nodeName="test" urlName="test" writerName="Administrator" nodeTypeAlias="Image" path="-1,1075,1076"> <umbracoFile>/media/41/suni.gif</umbracoFile> <umbracoWidth>152</umbracoWidth> <umbracoHeight>79</umbracoHeight> <umbracoBytes>3150</umbracoBytes> <umbracoExtension>gif</umbracoExtension></Image> </imageID></macro>
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
Problem with getmedia 4.5.2
Can anybody see whats wrong with this
the macro throws an error...
If i do a simple
<xsl:value-of select="/macro/imageID"/>
i get "/media/41/suni.gif152793150gif" so there is data present inside the scope...
Hi Claus,
Looks like it's a "mediaCurrent" variable, right?
Those already return the XML, so you can just do:
/Chriztian
Yes, its a mediaCurrent, but it still doesnt work for some reason...
when doing a <xsl:copy-of select="$media/umbracoFile"/> i get nothing
<xsl:copy-of select="$media"/> returns /media/41/suni.gif152793150gif ?!? strange...
Hi Claus
But isn't it the path that you need? Then you will just need the $media variable, right?
The output looks like you're using the "upload" datatype on your page...and then I guess it all makes sense (if i'm right off course :-))
/Jan
I also had this problem. Somehow I had a problem with putting it into a variable, but getting it directly worked:
You could try something like this:
Now you get the value directly from the macro instead of the variable. Worked for me.
Jeroen
Thanks Jeron, that worked
Ah ok - might be getting more than we asked for, so to speak - what does this give you:
Hopefully something along the lines of:
/Chriztian
i get
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.