[Zope-dev] How to render DTML that is not stored in the ZODB?

Robert Rottermann robert@redcor.ch
Mon, 19 Nov 2001 17:38:59 +0100


Create a dtml-method programmatically and feed it your text with dtml vars
embedded.
Like so:

    def _dealWithDtml ( self, data ) :
        num_id = int(random.random() * 100000)
        str_id = 'tmp' + str(num_id)
        self.manage_addProduct['OFSP'].manage_addDTMLMethod(id=str_id,
title='')
        obj = self[str_id]
        obj.manage_edit(data, '')
        data = obj(self, self.REQUEST)
        self.manage_delObjects(str_id)
        return data

robert

----- Original Message -----
From: "Dario Lopez-Kästen" <dario@ita.chalmers.se>
To: <zope-dev@zope.org>
Sent: Monday, November 19, 2001 3:31 PM
Subject: [Zope-dev] How to render DTML that is not stored in the ZODB?


> Hello!
>
> I have a bunch of dtml in my Oracle DB, that I of course want to render.
>
> doing the <dtml-var expr="_.getitem('<column_name>', 1)"> does not work.
>
> I essence Zope does not render strings in variables to DTML.
>
> Any suggestions? (It has to be DTML)
>
> *MANY* Thanks In Advance.
>
> /dario
>
> - --------------------------------------------------------------------
> Dario Lopez-Kästen     Systems Developer  Chalmers Univ. of Technology
> dario@ita.chalmers.se  ICQ will yield no hits    IT Systems & Services
>
>
>
> _______________________________________________
> Zope-Dev maillist  -  Zope-Dev@zope.org
> http://lists.zope.org/mailman/listinfo/zope-dev
> **  No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope )
>