[Zope] Restricted Traverse

Andrew Milton akm at theinternet.com.au
Sat Nov 11 08:57:21 EST 2006


+-------[ Nancy Donnelly ]----------------------
| Could someone tell me what's wrong with this code?
| 
| <span
|     tal:define="global url python:here.absolute_url(relative=None) + '/
| index_frame.pt#quotes'"
| />
| <span
|     tal:define="root python:container.restrictedTraverse(url)"
|     tal:replace="structure python:here.printSiteMap(root, 12)"
| />
| 
| --or--
| 
| <span
|     tal:define="root python:container.restrictedTraverse(here.absolute_url
| (relative=None) + '/index_frame.pt#quotes')"
|     tal:replace="structure python:here.printSiteMap(root, 12)"
| />
| 
| 
| I'm trying to automate that restrictedTraverse.

absolute url returns a string prefixed with "http(s)://", unless the relative
parameter evaluates to true.... None doesn't do that.

Try using relative = True


-- 
Andrew Milton
akm at theinternet.com.au


More information about the Zope mailing list