[Zope] Simple DTML Method/Acquisition problem

Michael Bernstein mbernstein@profitscape.net
Fri, 05 Mar 1999 10:10:27 -0800


David Ascher wrote:
> 
> I have a standard_html_header/footer pair which works much like that on
> zope.org.
> 
> The header inserts a <!--#var sidebar--> in the left column.  The
> sidebar DTML method is:
> 
> <!--#in expr="objectValues(['Folder'])"-->
> <!--#if hidden -->
> <!--#else -->
> <a href="<!--#var id-->"><!--#var title--></a><p>
> <!--#/if -->
> <!--#/in -->
> 
> (show links to sub-folders which don't have the 'hidden' property set).
> 
> The above works fine in the toplevel folder.  In the subfolder, however,
> nothing shows up, even though there are two folders which do qualify.

Try: <!--#var "sidebar(PARENTS[-1],REQUEST)"-->

This will call the method using the root folders' namespace, thereby
showing all qualifiying subfolders regardless of where the method is
called from. You might have to modify your method to construct absolute
URL's.


Michael Bernstein.