[Zope] Var includes
Martijn Pieters
mj@atmm.nl
Fri, 19 Feb 1999 17:55:13 +0100
>Do I have to write an External Function to split the directory and
>perform the equivalent of nested <!--#with-->'s to include this? I had
>hoped for a simple DTML based solution.
<!--#in expr="_.string.split(location, '/')"-->
<!--#if sequence-start-->
<!--#call "REQUEST.set('strFolder', _['sequence-item'])"-->
<!--#else-->
<!--#call "REQUEST.set('strDocument', _['sequence-item'])"-->
<!--#/if-->
<!--#/in-->
Now we have altered the namespace. Now, these objects, are they _IN_ the
current folder (i.e. in folder temp_people the folder uid the object studinfo)?
Then you do:
<!--#in expr="_.getitem(strFolder).objectItems(['Folder'])"-->
<!--#if "_['sequence-key'] == strDocument"-->
<!--#with sequence-item-->
<!--#var title--> <== now in the namespace of the subobject
<!--#/with-->
<!--#/if-->
<!--#/in-->
Took me a minute, but it works.
--
M.J. Pieters, Web Developer
| ATMM http://www.atmm.nl
| Tel: +31-35-6254545 Fax: +31-35-6254555
| mailto:mj@atmm.nl http://www.atmm.nl/~mj
| PGP: http://wwwkeys.nl.pgp.net:11371/pks/lookup?op=get&search=0xA8A32149
------------------------------------------