[Zope-CMF] workflow (public/private), reusing code, and separation
ofpresentation...
Chris Withers
chrisw@nipltd.com
Wed, 18 Jul 2001 22:35:47 +0100
I just wanted to shout "me too!" with this...
The content object should not let people get it's attributes if the workflow
state doesn't allow it. That should be the case with CookedBody() below...
cheers,
Chris
marc lindahl wrote:
>
> 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?)
>
> _______________________________________________
> Zope-CMF maillist - Zope-CMF@zope.org
> http://lists.zope.org/mailman/listinfo/zope-cmf
>
> See http://www.zope.org/Products/PTK/Tracker for bug reports and feature requests