[Zope-DB] Dynamic content in Zope

Charlie Clark charlie at egenix.com
Tue Oct 25 07:41:52 EDT 2005

On 25.10.05 at 13:29:04 [+0200], Gergana Silvanova 
<gergana_silvanova at yahoo.com> wrote:
> Hello,
> I have one "select" field, and depending on my
> selection, I want to display an "input" field or
> another "select" field, next to it.
> Is there a way to do this in Zope?
> In general, I think that DTML does not give you much
> freedom to have dynamic content.


first of all I suggest using ZPT instead of DTML. You might then do 
something like
<block tal:condition="python: test(mytest(), 1, 0)">

This will work in very simple situations. For more complex situations you 
will probably want to break your logic (here the "test") into a 
PythonScript and you might want to look at using Macros for reusing this 
element in different templates.


Charlie Clark

Professional Python Services directly from the Source
 >>> Python/Zope Consulting and Support ...        http://www.egenix.com/
 >>> mxODBC.Zope.Database.Adapter ...             http://zope.egenix.com/
 >>> mxODBC, mxDateTime, mxTextTools ...        http://python.egenix.com/

::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! ::::

More information about the Zope-DB mailing list