X-Mozilla-Status2: 00000000
Message-ID: <372DCEEC.4E461F02@jimihendrix.net>
Date: Mon, 03 May 1999 13:29:32 -0300
From: Ze Octavio <joctavio@jimihendrix.net>
X-Mailer: Mozilla 4.5 [en] (WinNT; I)
X-Accept-Language: en
MIME-Version: 1.0
To: Sture Lygren <raver@postkontor.andoy.vgs.no>
Subject: Re: [Zope] Enter subfolders and get file-listings (2. try)
References: <3.0.3.32.19990503175911.00690510@postkontor.andoy.vgs.no>
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi Sture,

    Try this, where name_folder is your literal name forlder, like
images:

    <!--#with name_folder-->
       <!--#in "objectValues(['DTML Document'])"-->]
          <A> HREF=3D"/some/place/show_files?folder_id=3D<!--#var
id-->"><!--#var title--></A><BR>

       <!--#/in-->
    <!--#/with-->

    If U have to do a lot of lists like that one, I suggest U make an
module os Python to do that, your DTML code will be very less obscure.

Ze Octavio - Hiperl=F3gica <http://hiper.com.br>

Sture Lygren wrote:
>=20
> Hi!
>=20
> I Apologize if this one has shown up on the list already (I sent a mail
> about 10 hours ago ago and I see nothing)
>=20
> Now to my question...
>=20
> I wonder how I can get into subfolders and display the content therein.
>=20
> I have this DTML method:
>=20
> <!--#in "objectValues(['Folder'])"-->
> <IMG SRC=3D"<!--#var icon-->"> <A
> HREF=3D"/some/place/show_files?folder_id=3D<!--#var id-->"><!--#var
> title--></A><BR>
> <!--#/in-->
>=20
> Pressing the link on a folders title will bring on folder_id to the
> show_files DTML method. This is ok, but how can I get into the folder with
> id=3Dfolder_id, so that I can display the files therein?
>=20
> I tried:
>=20
> <!--#in "objectValues(['Folder'])"-->
> <!--#if "id=3D=3Dfolder_id"-->                      #this one doesn't wor=
k - why?
> <!--#in "objectValues(['File'])"-->
> <!--#var id-->
> <!--#/in-->
> <!--#/if-->
> <!--#/in-->
>=20
> And:
>=20
> <!--#call "_.getattr(PARENTS[0],folder_id)"-->
> <!--#in "objectValues(['File'])"-->
> <!--#var id-->
> <!--#/in-->
>=20
> This one displays nothing - why?
>=20
> Please tell me the correct way to handle this problem.
>=20
> Sture Lygren
>=20
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://www.zope.org/mailman/listinfo/zope
>=20
> (For developer-specific issues, use the companion list,
> zope-dev@zope.org - http://www.zope.org/mailman/listinfo/zope-dev )
