[ZPT] determining the value of a folder's property
Sun, 6 Apr 2003 08:23:04 +0200
<li tal:condition=3D"subfolder/navigation | nothing">
avoids an error when navigation does not exist.
to have the folders sorted on an other field than the name you have to crea=
your own routine in a python script you have to call yourself like:
<span tal:repeat =3D "subfolder=20
assuming your script has a paramater folders in which you pass the folders =
for folder in folders:
for name in names:
Am Sonntag, 6. April 2003 04:41 schrieb Jamie:
> I have a Dynamic folder driven navigation system set up using this:
> <li tal:condition=3D "python:len(request.PARENTS) > 2" ><a href=3D
> to parent</a></li>
> <span tal:repeat =3D "subfolder python:here.objectValues('Folder')">
> <li tal:condition=3D"subfolder/navigation">
> <a tal:attributes=3D "href subfolder/absolute_url"
> tal:content=3D "subfolder/title_or_id">
> link to subfolder
> I have added a Boolean property (navigation) to all of my folders which
> lets me determine whether a folder should show up in my menu. If I
> create a folder without the navigation property it gives me an error. Is
> there a way to avoid this, because I would like to have some folders not
> have this property at all.
> Also, I need a way to sort the folders that show up in the menu other
> than alphabetically.
> Thanks for your time,
> Jamie White
mit freundlichen Gr=FCssen