cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andreas Hartmann <andr...@apache.org>
Subject Re: choose a random image
Date Tue, 14 Oct 2003 11:59:33 GMT
Andreas Hartmann wrote:

> Bertrand Delacretaz wrote:
> 
>> Le Mardi, 14 oct 2003, à 13:34 Europe/Zurich, Jon Evans a écrit :
>>
>>> ...I can use a directory generator to give me a list of images, but I 
>>> don't know how to transform that list in order to select one of them 
>>> at random.

[...]

> What about the RandomNumberModule?
> http://cocoon.apache.org/2.1/apidocs/org/apache/cocoon/components/modules/input/RandomNumberModule.html


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>

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

Andreas



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message