[Zope] <dtml-with> problem

Tom Schwaller Tom.Schwaller@linux-magazin.de
Sat, 11 Sep 1999 04:03:53 +0200


"Phillip J. Eby" wrote:
> 
> Try:
> 
> <dtml-with issue><dtml-with 1998><dtml-with 01>
> ...
> </dtml-with></dtml-with></dtml-with>

yes! This works. I'm just back from the Linux-Kongress 
(aka my personal Zope-2.0 promotion tour, I wish I had a 
Zope T-Shirt :-)) and happy to see a solution for my problem.

"Michel Pelletier"  wrote

>Numbers are not valid python names.

ok. Nevertheless you can use numbers as folder names,
which was the reason I got into trouble...

>You can, however, use getattr:

><dtml-with "_.getattr(_.getattr(issue, '1998'), '01')">

I like this one :-)

>or:

><dtml-with issue>
  <dtml-with 1998>
    <dtml-with 01>
      ...

>>DTML tags arguments used 'by name' and not in an expression can access
>>illegal python names (because it uses getattr). ;)

that's fine.

Thanks a lot to all for the help..


-- 

Tom