[Zope] modifying resolve_url method

Chris McDonough chrism@zope.com
Sat, 13 Apr 2002 09:38:26 -0400


Hi Steven,

Instead of using resolve_url you probably want to use the 
restrictedTraverse and getPhysicalPath methods like so:

<dtml-var "restrictedTraverse(this().getPhysicalPath())">

For more info, see the Zope help system.

- C


Steven Turoff wrote:
> Greetings,
> 
> I am new to Object Oriented Programming and want to know what the best 
> way to modify the resolve_url method is. I need to add one line of code 
> to this method. I'm guessing I can edit 
> lib/python/ZPublisher/HTTPRequest.py, recompile it, and restart Zope. Is 
> there a better way?
> 
> The reason I need to do this is because I am using a SiteRoot and zope 
> is generating a "Different Namespace" error when I  do something like 
> <dtml-var "REQUEST.resolve_url(URL1)">
> 
> Thanks,
> 
> Steve
> 
> 
> 
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce
> http://lists.zope.org/mailman/listinfo/zope-dev )


-- 
Chris McDonough                    Zope Corporation
http://www.zope.org             http://www.zope.com
"Killing hundreds of birds with thousands of stones"