Andrew Kenneth Milton wrote:
> +-------[ [EMAIL PROTECTED] ]----------------------
> | Hi,
> | I wonder how one would show the dtml documents in a folder with a
> | dtml statement.  I see it working with the tree command and I see
> | it working in Yihaw, but there must be a simple way to show just
> | files as links by some sort of call with the subfolder name.  Any
> | ideas?
> Here's possibly the ugliest idea..
> <dtml-with SubFolder>
> <dtml-in "objectIds()">
> <a href="<dtml-var "_.getitem(_['sequence-item'],0).absolute_url()">"><dtml-var 
> </dtml-in>
> </dtml-with>
> We use objectIds() rather than objectValues in case you want to pass a mask
> to objectIds(). This way we only instantiate the objects we're interested
> it.
> We could have used nested calls to getitem, but, that wasn't as funky looking.

FYI you can pass a mask to objectIds as well. 

<dtml-with SubFolder>
<dtml-in "objectItems(['DTML Document'])">
<a href="&dtml-var.absolute_url"><dtml-var sequence-key></a>

Zope maillist  -  [EMAIL PROTECTED]
**   No cross posts or HTML encoding!  **
(Related lists - )

Reply via email to