[Zope-dev] Two Puzzling Questions.

Anthony Baxter Anthony Baxter <anthony@interlink.com.au>
Tue, 21 Dec 1999 13:21:44 +1100


>>> "Clayton Miller" wrote
> First Question:
> I am attempting to use the dtml tree tag to show the folders under
> a different folder branch from the one I am currently on. For example,
> /site1/subfolder1 is where the application is running but I wish to
> display all of the subfolders in /site2/folderA. My code looks like
> this:
>   dtml-with folderA
>     dtml-tree branches_expr="objectValues(['Folders'])"
>        dtml-var title_or_id   {NOTE: I actually make a HTML HREF here}
>     /dtml-tree
>   /dtml-with
> 
> After playing around with this code a little while (by replacing the
> branches_expr with a branches=objectValues, I realized that I am still
> using the /site1/subfolder1 as my point of reference for the tree tag (i.e. 
> the root directory). So, finally my question is why am I not seeing the 
> subfolders under /site2/folderA? I am using Zope 2.1.1.

try 
<dtml-tree folderA>
  <dtml-var title_or_id>    
</dtml-tree>


> Second Question:
> I am using two frames (Menu and Main). In my "Main" frame, I have a submit 
> button that I wish to display the results in the "Menu" frame. Since I have 
> multiple submit buttons, I am calling a decision dtml method that examines 
> the submit value and decides which dtml method to display. So, my question 
> is using dtml, how do I specify a particular frame? My current resulting 
> dtml method shows up in the "Main" frame where the button was pressed. My 
> decision dtml method looks something like:

Use the 'target' attribute in your initial <form> tag.

Or else in your main page, put some javascript to change the location
of the other frame. 

The former is going to be easier. :)


Anthony