[ZPT] Folder - index_html
Dieter Maurer
dieter at handshake.de
Sun Aug 10 20:16:38 EDT 2003
Simon Faulkner wrote at 2003-8-10 14:44 +0100:
> ...
> A *really* simple system to show the ststus of various orders sorted by
> Country and Depot such that people log in with their country name and a
> password and can only see the depots/orders for thir country.
>
> I have made a folder called Countries, sub folders called by Depot name and
> we place the orders (ZClass instances :-) in the corresponding depot folder.
>
> I would like to place an index_html ZPT in top level Countries folder that
> the sub folders can aquire.
>
> It needs to list the Depots (sub folders) if it is a Country folder (first
> level down) and list the orders in the folder if it id a Depot (2nd level
> down)
If I understand you right, then your "index_html" should list the contents
of the folder it is "called for". "here" is this folder.
Thus, you could use:
<XXX tal:repeat="item here/objectValues">
... display item here in any convenient way ...
</XXX>
Of course, you would replace "XXX" above by an appropriate HTML tag.
When you need to, you can ask for "items"s "meta_type" to
determine whether it is a folder or an instance of your ZClass.
Dieter
More information about the ZPT
mailing list