I have scoured the forum but can't find the answer i need.
I have an upload control on a page to upload an image for a product. I cannot figure out how to get the path to the thumbnail to show on my products listing page. I have tried all examples on here and none work.
The sample posted is based on the old XML schema used in older Umbraco versions. With 4.5 there is a new schema.
The above sample seems to be a mix of the new and old schema.
For an example this part does not make sense with the new schema <img src="{@productImage}" alt="{data [@alias = 'photoText']}" />
in the alt attribute the old data [@alias = photoText] is used. And the @productImage does not make sense since I don't think the productImage is an attribute in the XML output?
I'm guessing that the above line of code should look like this instead
<img src="{productImage}" alt="{photoText}" />
I can imagine that this is the XML elements containing the values that you need.
Maybe you should try to make a xsl:copy-of to see what XML you get returned. It makes it much more easy to work with and find out what you need to match.
You can do it by making a textarea like this
<textarea> <xsl:copy-of select="$currentPage/* [@isDoc and string(umbracoNaviHide) != '1']" /> </textarea>
Hope this makes a little sense and that it helps a bit.
Uploaded Image
Hi,
I have scoured the forum but can't find the answer i need.
I have an upload control on a page to upload an image for a product. I cannot figure out how to get the path to the thumbnail to show on my products listing page. I have tried all examples on here and none work.
Please can someone tell me what i'm doing wrong!
Thanks
Chris
What version of Umbraco are you running?
Sorry, school boy error there.
it's 4.5.2 on iis6
Hi Chris
The sample posted is based on the old XML schema used in older Umbraco versions. With 4.5 there is a new schema.
The above sample seems to be a mix of the new and old schema.
For an example this part does not make sense with the new schema
<img src="{@productImage}" alt="{data [@alias = 'photoText']}" />
in the alt attribute the old data [@alias = photoText] is used. And the @productImage does not make sense since I don't think the productImage is an attribute in the XML output?
I'm guessing that the above line of code should look like this instead
<img src="{productImage}" alt="{photoText}" />
I can imagine that this is the XML elements containing the values that you need.
Maybe you should try to make a xsl:copy-of to see what XML you get returned. It makes it much more easy to work with and find out what you need to match.
You can do it by making a textarea like this
<textarea>
<xsl:copy-of select="$currentPage/* [@isDoc and string(umbracoNaviHide) != '1']" />
</textarea>
Hope this makes a little sense and that it helps a bit.
/Jan
is working on a reply...