Author: andre Date: 2010-07-16 12:07:42 +0200 (Fri, 16 Jul 2010) New Revision: 42929
Modified: openimages/trunk/src/main/webapp/WEB-INF/tags/oip/thumb.tagx Log: still gave errors sometimes, should be allright now Modified: openimages/trunk/src/main/webapp/WEB-INF/tags/oip/thumb.tagx =================================================================== --- openimages/trunk/src/main/webapp/WEB-INF/tags/oip/thumb.tagx 2010-07-15 20:51:16 UTC (rev 42928) +++ openimages/trunk/src/main/webapp/WEB-INF/tags/oip/thumb.tagx 2010-07-16 10:07:42 UTC (rev 42929) @@ -8,13 +8,13 @@ <jsp:directive.attribute name="alt" description="Text to use in alt attribute of image" /> <mm:nodeinfo type="type" write="false" id="nodetype" /> - <mm:import id="img" reset="true" /> + <c:set var="img" value="" /> <mm:hasrelationmanager sourcemanager="$nodetype" destinationmanager="images" role="related"> <mm:relatednodescontainer type="images" role="related" searchdirs="destination"> <mm:maxnumber value="1" /> <mm:relatednodes> - <mm:image mode="url" width="81" height="60" crop="end" id="img" write="false" /> + <c:set var="img"><mm:image mode="url" width="81" height="60" crop="end" /></c:set> <img src="${img}" alt="${alt}" width="81" height="60" /> </mm:relatednodes> </mm:relatednodescontainer> @@ -26,13 +26,13 @@ <mm:sortorder field="posrel.pos" direction="UP" /> <mm:maxnumber value="1" /> <mm:relatednodes> - <mm:image mode="url" width="81" height="60" crop="end" id="img" write="false" /> + <c:set var="img"><mm:image mode="url" width="81" height="60" crop="end" /></c:set> <img src="${img}" alt="${alt}" width="81" height="60" /> </mm:relatednodes> </mm:relatednodescontainer> </mm:hasrelationmanager> </c:if> - + <c:if test="${empty img}"> <c:choose> <c:when test="${nodetype eq 'mmbaseusers'}"> @@ -43,12 +43,12 @@ </c:when> <c:when test="${nodetype eq 'imagefragments'}"> <mm:relatednodes type="imagesources" max="1"> - <mm:image mode="url" width="81" height="60" crop="end" id="img" write="false" /> - <img src="${img}" alt="${alt}" width="81" height="60" /> + <c:set var="img"><mm:image mode="url" width="81" height="60" crop="end" /></c:set> + <img src="${img}" alt="${empty alt ? 'image' : alt}" width="81" height="60" /> </mm:relatednodes> - <mm:notpresent referid="img"> + <c:if test="${empty img}"> <img src="${mm:link('/style/images/thumb_image.png')}" alt="${empty alt ? 'image' : alt}" width="81" height="60" /> - </mm:notpresent> + </c:if> </c:when> <c:when test="${nodetype eq 'images'}"> <img src="${mm:link('/style/images/thumb_image.png')}" alt="${empty alt ? 'image' : alt}" width="81" height="60" /> _______________________________________________ Cvs mailing list Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs