Developer forum
E-mail notifications
Datalist list-template problem
The problem I am facing, is that I want to show or link to the pictures that I upload via the forms-module. Right now, it simply shows the relative path to the picture, and I want to be able to insert <img src=http://solution.net.dynamicweb.dk[CollumnValue] /> or something simular.
Is this only possible through xslt?
My XSLT is far from good enough to be able to create this kind of template, so I hope this can be done with the html-template, somehow.
Replies
If you have other collumns, like Name, Email and Title for instance, the output from these will also be included in the image-tag and will then result in a broken image.
It is possible with XSLT. If the path to the file always is the same then it can be done like this:
<xsl:choose>
<xsl:when test="starts-with(Row.Value, '/Files/Filer')">
<td><a href="http://www.domainname.dk/{Row.Value}"><xsl:apply-templates select="Row.Value" /></a> </td>
</xsl:when>
<xsl:otherwise>
<td><xsl:apply-templates select="Row.Value" /></td>
</xsl:otherwise>
</xsl:choose>
Yes, with XSLT everything, almost, is possible.
But in Lars' case he doesn't really have this option.
Unfortunately it is not possible to do when using HTML since the loop is containing multiple fieldtypes.
// Dammark
Thanks for your response anyway.
It seems that I will need to learn some XSLT :) In any case, I can use your help and examples - also from the Photoblog-guides - to get some practice.
You must be logged in to post in the forum