[Zope-dev] Modifying a ZPT state based on a certain parameter

Takahashi, Michael MTakahashi at oid.ucla.edu
Mon Dec 19 17:05:52 EST 2005


Hi guys,

I am running on Zope 2.7.6 with Plone 2.0.5. I am currently building a
dynamic application using MySQL as the backend database.  I'd like to be
able to change a ZPT's state based on a parameter passed by the db.

For example, I have a ZPT that displays information for a particular
course.  However, if this courses "active" field is set to NO, then I
would like to be able to have the ZPT's state be visible.  If the
courses "active" field is set to "yes" then I would like to modify the
state so that the ZPT is published.


I'm thinking I'd probably have to use the wf_tool in conjunction with
portal_workflow?  A call similar to something like so:

tal:condition="python:records.active=='yes'" ...then implement the
necessary call to modify the workflow and make the ZPT published and
vice versa.


Any help is greatly appreciated.


Thanks,

Mike
 


More information about the Zope-Dev mailing list