generalizing DTML method question
Hi Zopers How do I generalize this DTML method? ....................................... <dtml-call "REQUEST.set('myList', [])"> <dtml-in origin_values> <dtml-call "myList.append(name)"> </dtml-in> <dtml-return myList> ....................................... The problem is that 'origin_values' bit. It's a TinyTable. I want to make 'makeList' a DTML method on its own, and then call it to make lists of: clearance_values docs_values origin_values products_values series_values -- jean
On Tue, 22 Aug 2000, Jean Jordaan wrote:
How do I generalize this DTML method? [...] <dtml-in origin_values> [...] The problem is that 'origin_values' bit. It's a TinyTable. I want to make 'makeList' a DTML method on its own, and then call it to make lists of:
clearance_values [...]
You could try <dtml-in "_[somevar]"> where somevar holds the id of the tinytable. I didn't test it, so there might be some issues about calling the tinytable to resolve. Or you could write an external method, which could take the table as an argument. I'd recommend that for this case, since this method is pure logic and not presentation at all. Or I think you could wrap the call to the dtml-method in, eg: <dtml-let somevar="clearance_values"> <dtml-call "REQUEST.set... </dtml-let> and just use <dtml-in somevar> inside your method. --RDM
participants (2)
-
Jean Jordaan -
R. David Murray