Mailing List Archive

Dynamic content in Zope
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.

Best wishes,
Gergana Silvanova







__________________________________
Yahoo! Mail - PC Magazine Editors' Choice 2005
http://mail.yahoo.com
_______________________________________________
Zope-DB mailing list
Zope-DB@zope.org
http://mail.zope.org/mailman/listinfo/zope-db
Re: Dynamic content in Zope [ In reply to ]
On 25.10.05 at 13:29:04 [+0200], Gergana Silvanova
<gergana_silvanova@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.

Gergana,

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

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

--
Charlie Clark
eGenix.com

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 ! ::::
_______________________________________________
Zope-DB mailing list
Zope-DB@zope.org
http://mail.zope.org/mailman/listinfo/zope-db