[Zope] "REQUEST" a string object?
Jonothan Farr
jfarr@real.com
Mon, 24 Jul 2000 19:05:58 -0700
I couldn't reproduce this. The following code works for me in Zope 2.1.6,
verbatim.
<dtml-var standard_html_header>
<dtml-call "REQUEST.set('spec', '*')">
<dtml-call "REQUEST.set('num_dir_columns', 3)">
<table>
<dtml-call "REQUEST.set('ctr', 0)">
<dtml-in "local.fileValues(REQUEST.get('spec', _.None))">
<dtml-if "type == 'directory'">
<dtml-if "ctr % num_dir_columns == 0">
<tr>
</dtml-if>
<td><a href="<dtml-var URL1>/<dtml-var url>"><dtml-var "id"></a><br>
<dtml-if "ctr % num_dir_columns == num_dir_columns - 1">
</tr>
</dtml-if>
<dtml-call "REQUEST.set('ctr', _.int(ctr) + 1)">
</dtml-if>
</dtml-in>
<dtml-comment> In case we end in the middle of a row... </dtml-comment>
<dtml-if "ctr % num_dir_columns != 0">
</tr>
</dtml-if>
</table>
<dtml-var standard_html_footer>
Maybe you can play with this as a starting point.
I added a couple of REQUEST.set() calls at the top to simulate variables passed
from a form, I assume.
'local' is my LocalFS object. Are you using this code in a <dtml-with> statement
or are you actually serving it as a .dtml file from the local file system?
--jfarr
"Perl is worse than Python because people wanted it worse."
Larry Wall, 14 Oct 1998