Dieter Maurer wrote:
>  > Here's my problem:
>  >
>  > given a method itemURL(), that typically returns a site
>  > relative URL such as '/about/', I need to change to the
>  > appropriate directories context using <dtml-with>.
>  >
>  > In short I need to do the equivalent of <dtml-with about>.
> You may try
>   <dtml-with "REQUEST.resolve_url(SCRIPT_NAME + itemURL)">

This whole area is a lot nicer in 2.2 thanks to the Traversal interface.

Dieter's DTML becomes:

<dtml-with "getPhysicalRoot().restrictedTraverse(itemURL())">

See the following for more details:
http://www.zope.org/Members/michel/Projects/Interfaces/ObjectManagerItem

cheers,

Chris

_______________________________________________
Zope maillist  -  [EMAIL PROTECTED]
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 )

Reply via email to