[Zope] python-generated navigation..

Robert Rottermann robert@redcor.ch
Tue, 30 Apr 2002 20:52:47 +0200


instead of  context in the following line
for object in context.objectValues(['Folder', 'DTML Document']):
use
container

Robert
----- Original Message -----
From: "Joerg Wagenknecht" <Wagenknecht@justFX.com>
To: <zope@zope.org>
Sent: Tuesday, April 30, 2002 7:31 PM
Subject: [Zope] python-generated navigation..


> Hi list,
>
> I use a short python script to get a list of objects (folder (with
property
> "menue") or documents) to build a navigation tree:
>
> ## Script (Phyton) "menueobjects"
>
> results=[]
> for object in context.objectValues(['Folder', 'DTML Document']):
>  if object.hasProperty('menue') and object.menue:
>   results.append(object)
> return results
>
> This script lies within the root folder. I then use a DTML method to call
this
> script:
>
> <dtml-tree branches="menueobjects" skip_unauthorized="1">
>  <a href="&dtml-absolute_url;"><dtml-var title></a>
> </dtml-tree>
>
> My problem is, that I want to get ALL the tree from the root. So far,
whenever I
> go one level down the tree the navigation is shorted by that level.
>
> Any idea how to avoid that?
>
> Thanx in advance!
>
> Regards
> Joerg Wagenknecht
>
>
>
> _______________________________________________
> 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 )
>