[Zope] <dtml-with "portal_url.getPortalObject()">
gives AttributeError
J. Cameron Cooper
jccooper at jcameroncooper.com
Fri Nov 7 21:11:59 EST 2003
Marc Lindahl wrote:
> I'm trying to keep around some legacy code, in zope 2.5.1 (CMF 1.3)
>
> trying to surround a block with <dtml-with
> "portal_url.getPortalObject()"> so I reference root level folders. I
> get the error:
>
> Error Type: TALESError
> Error Value: exceptions.AttributeError on getPortalObject
>
> (it's a bit of dtml code in a ZPT page).
Guh? Do you mean you've put DTML in a ZPT? That's just plain not going
to work. You can call DTML Methods from the ZPT, but under no
circumstances will mix 'n match work.
> I've tried a variety of different evaluations, and proxy roles on the
> dtml method, with basically the same problem.
>
> Any idea how to do a dtml-with so you're at the root of a portal (also
> I'm using VHM)?
It's right so far as I can see provided you're in DTML.
--jcc
--
"My point and period will be throughly wrought,
Or well or ill, as this day's battle's fought."
More information about the Zope
mailing list