[Zope] Starting a search from the correct folder

John Poltorak jp at warpix.org
Thu Jun 30 17:27:37 EDT 2005



I have some code which here:-

<div><tal:loop tal:repeat="item python: request.PARENTS[-2::-1]">&gt;
  <a href="ABSOLUTE_URL"
     tal:attributes="href item/absolute_url"
     tal:content="item/title_or_id">PARENT TITLE OR
                                    ID</a> </tal:loop></div>

<ul tal:condition="python: context.objectValues(['Folder'])">
  <li tal:repeat="item python: context.objectValues(['Folder'])">
    <a href="ABSOLUTE_URL"
       tal:attributes="href item/absolute_url"
       tal:content="item/title_or_id">SUB-OBJECT TITLE OR ID</a></li>
</ul>


which automatically generates links to a number of folders which is 
exactly what I want. Understanding that Zope could do something like this 
has taken me quite a bit of time, although I still don't understand how 
this code works. What it actualy does is list the folders in the current 
folder and then allows me to select one which generates a subsequent list.
What I'd like to do is skip the first list. If I want to generate a list 
of folders in say the 'groups' folder, how would I change the code above?


-- 
John




More information about the Zope mailing list