[Zope] Subfolders in LocalFS

Bogemans, Thierry [PRDBE] TBOGEMAN@PRDBE.jnj.com
Thu, 14 Mar 2002 10:41:17 +0100


This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01C1CB3C.63F9B4F0
Content-Type: text/plain;
	charset="iso-8859-1"

I'm trying to get the content of a subfolder from a directory structure
using LocalFS doing the following :

<dtml-in
expr="Pictures['subfolder1']['subfolder2']['subfolder3'].fileItems()">
<dtml-var id>
</dtml-in>

So far, everything looks fine...

The actual problem is that I'm not able to enter a subfolder defined in a
variable way. It works out fine when there is only one subfolder :

<dtml-call "REQUEST.set('location','Summer')">
<dtml-in expr="Pictures[Summer].fileItems()">
<dtml-var id>
</dtml-in>

but what to do if we need a subfolder's subfolder ? We can try typing :

<dtml-call "REQUEST.set('location','Summer/Vacation')">
<dtml-in expr="Pictures[Summer].fileItems()">
<dtml-var id>
</dtml-in>

to get the content of the Summer/Vacation folder...
But this fails in ZOPE ! Can someone show me the light please.
Thanks,
Thierry

------_=_NextPart_001_01C1CB3C.63F9B4F0
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
5.5.2654.19">
<TITLE>Subfolders in LocalFS</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=3D2 FACE=3D"Arial">I'm trying to get the content of a =
subfolder from a directory structure using LocalFS doing the following =
:</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">&lt;dtml-in =
expr=3D&quot;Pictures['subfolder1']['subfolder2']['subfolder3'].fileItem=
s()&quot;&gt;</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">&lt;dtml-var id&gt;</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">&lt;/dtml-in&gt;</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">So far, everything looks =
fine...</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">The actual problem is that I'm not =
able to enter a subfolder defined in a variable way. It works out fine =
when there is only one subfolder :</FONT></P>

<P><FONT SIZE=3D2 FACE=3D"Arial">&lt;dtml-call =
&quot;REQUEST.set('location','Summer')&quot;&gt;</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">&lt;dtml-in =
expr=3D&quot;Pictures[Summer].fileItems()&quot;&gt;</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">&lt;dtml-var id&gt;</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">&lt;/dtml-in&gt;</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">but what to do if we need a =
subfolder's subfolder ? We can try typing :</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">&lt;dtml-call =
&quot;REQUEST.set('location','Summer/Vacation')&quot;&gt;</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">&lt;dtml-in =
expr=3D&quot;Pictures[Summer].fileItems()&quot;&gt;</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">&lt;dtml-var id&gt;</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">&lt;/dtml-in&gt;</FONT>
</P>

<P><FONT SIZE=3D2 FACE=3D"Arial">to get the content of the =
Summer/Vacation folder...</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">But this fails in ZOPE ! Can someone =
show me the light please.</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">Thanks,</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">Thierry</FONT>
</P>

</BODY>
</HTML>
------_=_NextPart_001_01C1CB3C.63F9B4F0--