[Zope] <input type=hidden value='<dtml-var x>' name=x> and LOOP

servel yannick yservel@glam.ac.uk
Fri, 23 Mar 2001 18:59:27 -0000


I would like to use 12 files and I would like to use a loop to create an
output similar to:

<input type=hidden value='D:\TEMP\DEFAULT.PR~' name='filename1'>
<input type=hidden value='' name='filename2'>
<input type=hidden value='D:\pagefile.sys' name='filename3'>
...
<input type=hidden value='C:\pagefile.sys' name='filename12'>


To reach this result, I would like to use something similar to the following
code:

def SaveMenu(self, REQUEST=None):
	s=""
	i = 1
	
	while i <= 12:
		
		s = s + "<input type=hidden value='%s' name='filename%s'>" %
((REQUEST.filename + i), i)
		i = i + 1 
	return s


Indeed the statement REQUEST.filename + i is illegal. Is there any
alternative to provide a similar result?

Thanks in advance 

Yannick