Hi, For a project I am wokring on I often need image enlargements. The image showed on the web page is small and when clicked on, a new window is openned with a larger version of the image. The source code often looks like this (simplified) <mm:relatednodes type="images" max="1"> <mm:field name="number"> <a href="<mm:url page="/zoom.jsp"/>?number=<mm:field name="number"/>"> </mm:field> <img src="<mm:image template="s(120)"/>" border="0"/> </a> </mm:relatednodes>
sometime the image needs to be aligned right or the "preview" image need to be 140 pix. this usualy resul in "My" website to be full of code that looks about the same but with small differences. what I would like is to create a "simple tag" that does this for me. so that the code can look like this: <mm:relatednodes type="images'> <keesj:image enlagement="true" template="s(120)"/> </mm:relatednodes> since that is not possible i used a dynamic jsp include that take parameters it now looks like this <mm:relatednodes type="images" max="1"> <mm:include page="/frontend/generic/beeldvergroting_source.jsp"> <mm:param name="img"><mm:field name="number"/></mm:param> <mm:param name="align">right</mm:param> </mm:include> </mm:relatednodes> and so accepts some optional parameters and uses so default parameters how do you solve such problems? is there a need to have "scriptable tags"? greetings //example of the "jsp tag"<[EMAIL PROTECTED] language="java" contentType="text/html; charset=ISO-8859-1" session="false" import="java.util.*" %> <%@ taglib uri="http://www.mmbase.org/mmbase-taglib-1.0" prefix="mm" %> <mm:import externid="img" required="true"/> <mm:import id="convert" externid="convert">s(160)</mm:import> <mm:import externid="caption">Afbeelding</mm:import> <mm:import externid="text">Klik voor een vergroting van deze afbeelding</mm:import> <mm:import externid="bgcolor"><mm:write referid="style_box"/></mm:import> <mm:import externid="fgcolor"><mm:write referid="style_text"/></mm:import> <mm:import externid="capcolor"><mm:write referid="style_hover"/></mm:import> <mm:import externid="textcolor"><mm:write referid="style_text"/></mm:import> <mm:import externid="width">160</mm:import> <mm:import externid="align">left</mm:import> <mm:import externid="hspace">0</mm:import> <mm:import externid="border">0</mm:import> <mm:import externid="class">Image</mm:import> <mm:import id="optionalParams" vartype="list">width,align,hspace,border,class,style,alt</mm:import> <a href="/javascript/beeldvergroting/index.shtml?<mm:write referid="img"/>" target="beeldvergroting<mm:write referid="img"/>" > <img name="<mm:write referid="img"/>" <mm:aliaslist referid="optionalParams" id="current"> <mm:notpresent referid="$current"><mm:import externid="$current"/></mm:notpresent> <mm:present referid="$current"><mm:write/>="<mm:write referid="$current"/>" </mm:present> </mm:aliaslist> src="http://images.vpro.nl/img.db?<mm:write referid="img"/>+<mm:write referid="convert"/>"></a>