Le Mardi, 14 oct 2003, � 13:59 Europe/Zurich, Andreas Hartmann a �crit :

...Sorry for my short answer, I imagine something like


<map:match pattern="random-image">
  <map:redirect-to uri="images/random/image{random:randomNumber}.jpg"/>
</map:match>

Damn - how does one keep track of all what we have in here, I missed that one ;-)


I think you don't even need the redirect, this should work with map:read as well, shouldn't it?

The min and max random number values would be configured in
cocoon.xconf.

That's the problem then, how do you keep track of a variable number of images?


So you might be back to java code in this case as well, or maybe:

-get the list of images (DirectoryGenerator)
-write an XSLT transform using java.util.random to select one
-output an HTML page with an <img> instead of outputting the image directly, to avoid the need for a redirect


-Bertrand


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to