[Zope] DTML method with input

Casey Duncan cduncan@kaivo.com
Tue, 17 Apr 2001 10:44:08 -0600


Sebal wrote:
> 
> First I'd like to thanx Dieter Maurer for his last help [I deleted all the
> installation, and reinstall an updated one -> OK]
> 
> I have a DTML method [frame] like
> 
> <dtml-var standard_html_header>
> <TABLE>
> <TR><TD> ...</TD></TR>
> <TR><TD><dtml-var fiche></TD></TR>
> <TR><TD> ...</TD></TR>
> </TABLE>
> <dtml-var standard_html_footer>
> 
> where <dtml-var fiche> is another DTML method
> 
> Now I have several 'fiche' and I'd like the [frame method] to be able to
> print the right 'fiche' when you've clicked on links. Imagine there's an
> index of 'fiche' and only one [frame method].
> 
> I tried with the dtml-let tag but it's not a simple solution (not a solution
> at all) : how can I use a test to put the good data in the TABLE?
> 
> If you have an idea ( simple one) ... feel free to answer. THANX
> 

A method takes the context of whatever you call it in. If fiche were a
DTML document, it might be easier, because then you could call [frame
method] in the context of fiche using acquisition like so:

http://myserver/folder/fiche/frame_method

frame_method would look like (it would need to live at or above all
fiche methods):

<dtml-var standard_html_header>
<TABLE>
<TR><TD> ...</TD></TR>
<TR><TD><dtml-var name="this"></TD></TR>
<TR><TD> ...</TD></TR>
</TABLE>
<dtml-var standard_html_footer>

"this" would then refer to the current context which would be whatever
fiche preceeded it in the URL. If fiche must be a DTML Method, then this
might work:

<dtml-var standard_html_header>
<TABLE>
<TR><TD> ...</TD></TR>
<TR><TD><dtml-var expr="PARENTS[0]"></TD></TR>
<TR><TD> ...</TD></TR>
</TABLE>
<dtml-var standard_html_footer>

-- 
| Casey Duncan
| Kaivo, Inc.
| cduncan@kaivo.com
`------------------>