[Zope] [Fwd: [Zope] Enter subfolders and get file-listings (2. try)]
Ze Octavio
joctavio@jimihendrix.net
Mon, 03 May 1999 14:57:15 -0300
This is a multi-part message in MIME format.
--------------2E8B916BB812202181149EF4
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
--------------2E8B916BB812202181149EF4
Content-Type: message/rfc822
Content-Transfer-Encoding: 8bit
Content-Disposition: inline
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: 8bit
Hi Sture,
Try this, where name_folder is your literal name forlder, like
images:
<!--#with name_folder-->
<!--#in "objectValues(['DTML Document'])"-->]
<A> HREF="/some/place/show_files?folder_id=<!--#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ógica <http://hiper.com.br>
Sture Lygren wrote:
>
> Hi!
>
> 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)
>
> Now to my question...
>
> I wonder how I can get into subfolders and display the content therein.
>
> I have this DTML method:
>
> <!--#in "objectValues(['Folder'])"-->
> <IMG SRC="<!--#var icon-->"> <A
> HREF="/some/place/show_files?folder_id=<!--#var id-->"><!--#var
> title--></A><BR>
> <!--#/in-->
>
> 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=folder_id, so that I can display the files therein?
>
> I tried:
>
> <!--#in "objectValues(['Folder'])"-->
> <!--#if "id==folder_id"--> #this one doesn't work - why?
> <!--#in "objectValues(['File'])"-->
> <!--#var id-->
> <!--#/in-->
> <!--#/if-->
> <!--#/in-->
>
> And:
>
> <!--#call "_.getattr(PARENTS[0],folder_id)"-->
> <!--#in "objectValues(['File'])"-->
> <!--#var id-->
> <!--#/in-->
>
> This one displays nothing - why?
>
> Please tell me the correct way to handle this problem.
>
> Sture Lygren
>
> _______________________________________________
> Zope maillist - Zope@zope.org
> http://www.zope.org/mailman/listinfo/zope
>
> (For developer-specific issues, use the companion list,
> zope-dev@zope.org - http://www.zope.org/mailman/listinfo/zope-dev )
--------------2E8B916BB812202181149EF4--