[opencms-dev] can opencms store pictures in diff sizes

Wiesner, Daniel daniel.wiesner at av-studio.de
Fri May 6 11:51:45 CEST 2005


Thank You Jorge,

good hint. My mistake was that I was trying  nest the taglibs:

src="<cms:link>/files/images/BurgG01.jpg</cms:link>" 

src="<%=cmsbean.link("/files/images/BurgG01.jpg")%>" does the job.


This library is what I was looking for. 
Now I need only a Listener witch is watching for changed vfs-images and if required cleaning up the cachedir.

Daniel




Jorge González schrieb:

>Here goes a code example...
>
>0) deploy the image taglib example war on tomcat and try it. Does it work ?
>
>If it works...
>
>1) change your ??/opencms/WEB-INF/web.xml and add this after the last
>'taglib' tag
>----
>    <taglib>
>        <taglib-uri>http://jakarta.apache.org/taglibs/image-1.0</taglib-uri>
>        <taglib-location>/WEB-INF/taglibs/taglibs-image.tld</taglib-location
>  
>
>    </taglib>
>----
>
>2) declare for use in the JSP
>
>----
><%@ taglib prefix="img" uri="http://jakarta.apache.org/taglibs/image-1.0" %>
>----
>
>3) Use it  (this code generates a 200x200 thumbnail in the "generated/"
>folder)
>
>----
>	<img:image
>		display="true"
>		refresh="true"
>		
>		name="<%="200x200_test_image"
>		dir="generated"
>		attributes="">
>		<img:resize width="200" height="200"/>
>	</img:image>
>----
>
>I hope that it helps.
>
>Jorge.
>
>
>
>_______________________________________________
>This mail is send to you from the opencms-dev mailing list
>To change your list options, or to unsubscribe from the list, please visit
>http://mail.opencms.org/mailman/listinfo/opencms-dev
>  
>



More information about the opencms-dev mailing list