How to pass the namespace of #in tag to separate DTML method
Hi, I'm trying to delegate the rendering inside the #in tag to separate DTML method, as it is repeated a few times. I'm trying to pass the namespace active inside the #in, but hav currently run out of ideas to try. My first guess was to do <!--#in myseq--> <!--#with _--> <!--#var render_row--> <!--#/with--> <!--#/in--> where render_row is equivalent to Row nr <!--#var sequence-item--> But this is probably redundant I also tried <!--#in myseq--> <!--#var render_row(namespace=_)--> <!--#/in--> where render_row is equivalent to <!--#with namespace--> Row nr <!--#var sequence-item--> <!--#/with--> But also with no success ;( ------------------------- Hannu
At 15:25 03/08/99 , Hannu Krosing wrote:
Hi,
I'm trying to delegate the rendering inside the #in tag to separate DTML method, as it is repeated a few times.
I'm trying to pass the namespace active inside the #in, but hav currently run out of ideas to try.
My first guess was to do
<!--#in myseq--> <!--#with _--> <!--#var render_row--> <!--#/with--> <!--#/in-->
where render_row is equivalent to
Row nr <!--#var sequence-item-->
But this is probably redundant
I also tried
<!--#in myseq--> <!--#var render_row(namespace=_)--> <!--#/in-->
where render_row is equivalent to
<!--#with namespace--> Row nr <!--#var sequence-item--> <!--#/with-->
But also with no success ;(
The DTML Method you call will be inside the namespace already. Try: <!--#in myseq--> <!--#var render_row--> <!--#/in--> -- Martijn Pieters, Web Developer | Antraciet http://www.antraciet.nl | Tel: +31-35-7502100 Fax: +31-35-7502111 | mailto:mj@antraciet.nl http://www.antraciet.nl/~mj | PGP: http://wwwkeys.nl.pgp.net:11371/pks/lookup?op=get&search=0xA8A32149 ------------------------------------------
Martijn Pieters wrote:
At 15:25 03/08/99 , Hannu Krosing wrote:
Hi,
I'm trying to delegate the rendering inside the #in tag to separate DTML method, as it is repeated a few times.
I'm trying to pass the namespace active inside the #in, but hav currently run out of ideas to try.
My first guess was to do
<!--#in myseq--> <!--#with _--> <!--#var render_row--> <!--#/with--> <!--#/in-->
where render_row is equivalent to
Row nr <!--#var sequence-item-->
But this is probably redundant
The DTML Method you call will be inside the namespace already. Try:
<!--#in myseq--> <!--#var render_row--> <!--#/in-->
Thanks! It is so much to get things working once you know they should work :) My mistake was in using Zope SQL methods, which I keep assuming to also look their variables up in the namespace. Is there any way to pass a whole namespace to ZSQL method instead of sticking them into arguments one by one ? -------------- Hannu
participants (2)
-
Hannu Krosing -
Martijn Pieters