[Zope-CMF] DefaultWorkflow.py -- how do I extend this?

Ken Manheimer klm@digicool.com
Thu, 3 May 2001 18:12:27 -0400 (EDT)


A correction on an response i sent this morning:

On Thu, 3 May 2001, Ken Manheimer wrote:

> If i understand your questions, i think the URL tool 'portal_url' does
> some of the things you want - source in CMFDefault/URLTool.py .  Eg,
> 
> Alan wrote:
> > 2. I would like to get a hold of the Portal root (how?) I would imagine it
> > would be something simple like using my aq_parent and ask it where is the
> > nearest Portal Root -- I would rather ask an object and not rely on
> > acquisition.
> 
> urltool = self.getToolByName('portal_url')
> portal = urltool.getPortalObject()

That first line isn't quite right - getToolByName isn't an acquired
method, it's a library routine, eg:

  from Products.CMFCore.utils import getToolByName
  urltool = getToolByName(self, 'portal_url')

  ...

(In case you can't tell, i'm coincidentally just getting to using this
stuff, myself!)

Ken