[Zope-CMF] workflow (public/private), reusing code, and separation of presentation...

marc lindahl marc@bowery.com
Tue, 17 Jul 2001 11:40:12 -0400


I know this overlaps some current threads, but to focus on this issue.  I'm
doing a CMF portal where there are other areas (folders) than the Members
area, and I'm running into the situation that in order to properly observe
the Workflow (e.g. with the default, simply controlling public/private
display behavior), I have to explicitly put DTML to check for this every
place I want to display something.

For example, I have a page which shows, among other things, the text from
another document called 'bio' in a table cell (if it exists):

<TD>
  <dtml-if expr="_.getitem('bio', 0)"><dtml-var
"bio.CookedBody()"></dtml-if>
</TD>

Now, that will show bio regardless of it's workflow status, unless I put a
pile of code in there.

Seems to me, the object (Document or whatever) should know better?  Also,
even if it doesn't, is there a standardized way to test for whether it's
displayable, independant of the exact workflow (e.g. what if there's no
'published' state, it's called 'public' instead?)