[thelist] Zope - top level folder listing cont...

martin.p.burns at uk.pwcglobal.com martin.p.burns at uk.pwcglobal.com
Thu Mar 28 12:23:00 CST 2002


Memo from Martin P Burns of PricewaterhouseCoopers

-------------------- Start of message text --------------------

...answering my own question again.

While the below *should* work according to the docs, this *does* work:

   <dtml-in expr="PARENTS[-1].objectValues('Folder')">
      <dtml-if sequence-var-isContentFolder>
      ....write out link
      </dtml-if>
</dtml-in>

because sequence-var-variablename *explicitly* accesses the current item.

Cheers
Martin


In part answering my own question, but

   <dtml-in expr="PARENTS[-1].objectValues('Folder')">
worked... up to a point.

See, the fun thing is that not all of my subfolders are content folders -
some have images, some resources and some are just plain temporary
scaffolding.

So I did what I thought would be a sensible thing, set a flag on content
folders, and conditionalise like so:

<dtml-in expr="PARENTS[-1].objectValues('Folder')">
    <dtml-if isContentFolder>
     ....write out link
    </dtml-if>
</dtml-in>

But while the above works fine for
http//www.mydomain.com/foo.html
once you get into sub-directories:
http//www.mydomain.com/bar/foo.html
it all goes pearshaped as the conditionalisation doesn't work.

For some reason, the method seems to think that *all* the top-level folder
objects have this property when called from an object which has it.

Cheers
Martin


--------------------- End of message text --------------------

This e-mail is sent by the above named in their
individual, non-business capacity and is not on
behalf of PricewaterhouseCoopers.

PricewaterhouseCoopers may monitor outgoing and incoming
e-mails and other telecommunications on its e-mail and
telecommunications systems.
----------------------------------------------------------------
The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential and/or privileged
material.  Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by persons or
entities other than the intended recipient is prohibited.   If you received
this in error, please contact the sender and delete the material from any
computer.




More information about the thelist mailing list