[Zope] Random code?
Dieter Maurer
dieter@handshake.de
Fri, 9 Nov 2001 22:06:32 +0100
Jonathan \(Listserv Account\) writes:
> Trying to randomly insert content into a page, using the following code:
>
> <dtml-var expr="_.whrandom.choice(myFolder.objectValues())">
>
> which chooses a random object from the folder 'myFolder' and includes it in
> the page. When I include HTML however, all '<' and '>' are rendered as
> '<' and '>' respectively, making the HTML code show up on the page.
>
> Anybody knows how to make it just include the code without changes?
"code without changes" sounds strange...
When you want the code to be executed, you need to render
the chosen object:
<dtml-var expr="_.render(_.whrandom.....)">
Dieter