Subject: Re: [Zope] Enter subfolders and get file-listings (2. try)
From: Ze Octavio <[email-masked]>
To: Sture Lygren <[email-masked]>
Date: Mon, 03 May 1999 13:29:32 -0300

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  -  [email-masked]
> http://www.zope.org/mailman/listinfo/zope
> 
> (For developer-specific issues, use the companion list,
> [email-masked] - http://www.zope.org/mailman/listinfo/zope-dev )