Needless to say, I've been starting out with Umbraco for a good while now, but I can't say I undestand much, if anything at all :)
What I'm trying to achieve here is to create an XSLT I can call via a Macro on any random node, and that XSLT is supposed to get images (and later on some info relating to the images). For now I'm just trying to get the images.
Under my root I have created a parent node (Vendors), and this parent node has a lot of children. Each child has and image called 'logotyp' picked with MediaPicker.
I've checked here for reference, but all I get is Error parsing XSLT file...
The code that I'm trying out looks like this (Supposed to be simple):
You'll want to change the "media" variable to pull from the current item in the for-each loop, right now it's trying to pull from the current page. Change to:
If you still get the error, you might try wrapping the contents of your for-each loop in <xsl:if test="logotyp != ''"> ... </xsl:if> or try adding it as a condition to your for-each, ie [@isDoc][logotyp != '']
Problems getting images from other nodes
Hi,
Needless to say, I've been starting out with Umbraco for a good while now, but I can't say I undestand much, if anything at all :)
What I'm trying to achieve here is to create an XSLT I can call via a Macro on any random node, and that XSLT is supposed to get images (and later on some info relating to the images). For now I'm just trying to get the images.
Under my root I have created a parent node (Vendors), and this parent node has a lot of children. Each child has and image called 'logotyp' picked with MediaPicker.
I've checked here for reference, but all I get is Error parsing XSLT file...
The code that I'm trying out looks like this (Supposed to be simple):
Any Ideas would be greatly appreciated, as I just can't figure this one out.
Thanks!
Hi,
You'll want to change the "media" variable to pull from the current item in the for-each loop, right now it's trying to pull from the current page. Change to:
If you still get the error, you might try wrapping the contents of your for-each loop in <xsl:if test="logotyp != ''"> ... </xsl:if> or try adding it as a condition to your for-each, ie [@isDoc][logotyp != '']
Hope this helps,
Tom
Yeah, thanks! Seems to be so easy when you guys work your magic :)
$currentPage removed from the media variable and it worked directly.
Thanks again!
is working on a reply...