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
I got the following code snippet:
<xsl:variable name="media" select="umbraco.library:GetMedia($nyhedsbilled, 0)" /> <textarea cols="40" rows="20"> <xsl:copy-of select="$media/imageCrop/crops" /> </textarea>
.. which gives this result:
<crops date="29/10/2010 14:17:59"><crop name="NyhedPreview" x="11" y="0" x2="90" y2="60" url="/media/4967/lille01_NyhedPreview.jpg" /><crop name="GalleriPreview" x="11" y="0" x2="90" y2="59" url="/media/4967/lille01_GalleriPreview.jpg" /><crop name="Galleri800x600" x="10" y="0" x2="90" y2="60" url="/media/4967/lille01_Galleri800x600.jpg" /></crops>
and that is fine but what I´m trying to get is the url value from the <crop>-node where the name attribute is 'NyhedPreview' so I thought I might try something like this:
<xsl:copy-of select="$media/imageCrop/crops/crop[@name='NyhedPreview'][@url]" />
but that returns the correct <crop>-node with all attributes ???
What am I doing wrong here ?
You are close, try this:
<xsl:value-of select="$media/imageCrop/crops/crop[@name='NyhedPreview']/@url" />
Yep ! That was it !
Thank you Sean
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Getting attribute value from node selected by another attribute.
I got the following code snippet:
.. which gives this result:
and that is fine but what I´m trying to get is the url value from the <crop>-node where the name attribute is 'NyhedPreview' so I thought I might try something like this:
but that returns the correct <crop>-node with all attributes ???
What am I doing wrong here ?
You are close, try this:
Yep ! That was it !
Thank you Sean
is working on a reply...