[Zope-CMF] Customizing worklists with Zclasses
John Morton
jwm@plain.co.nz
Tue, 2 Jul 2002 15:16:36 +1200
On Tue, 02 Jul 2002 04:01, S Haldar wrote:
> Hi all -
> I want to customize the worklist shown by DC Workflow
> to list the the entries from Zclass instances.
It seems to me that what you are really doing is customizing the
search skin that is linked to by the worklist links so that it reports
information specific to the content you are listing - which is a
particular ZClass in this instance.
What you ought to do is create a separate workflow for this content
type, and have it's worklist entries link to a customized search skin.
> I modified the TAL script given for the worklist URL.
> It is called portal_skins->zpt_generic->search.
The problem with doing this is that this search skin is used by
the site's generic search functions.
> I get the following error when I view the worklist:
> Files\WebSite\lib\python\AccessControl\ZopeGuards.py,
> line 47, in guarded_getattr
> TALESError: Sorry, an error occurred
TALES usually produces arcane error messages, but I expect the problem is
likely to be that your customized search skin is being called with just the
state you're interested in, and is fetching any content with that state set
in whatever state variable your workflow is using. The moment it comes to
render a content object without the properties you want, it spits the dummy.
Try setting the worklist URL to something like:
%(portal_url)s/search?review_state=pending&Type=MyZclass
or use meta_type=MyZClass, if that doesn't work. If that works out, go about
customizing a worklfow that uses worklists that call your customized search
page.
John