[Zope] dtml-with and referencing current object properties (?)

Samu Mielonen ex@uiah.fi
Fri, 15 Oct 1999 18:32:57 +0300


From: Martijn Pieters [mailto:mj@antraciet.nl]

>    <dtml-let month="ZopeTime().month()" year="ZopeTime().year()">
>      .. here you can use month and year in your code ..
>    </dtml-let>

Yup. After that code:

	<dtml-var year> is 1999
and
	<dml-var month> is 10

but

	<dtml-with "_[year]">

inside the above <dtml-let> statement gives me:

	Error Type: SystemError
	Error Value: bad argument to internal function

while:

	<dtml-with 1999>

works ok (i.e. goes inside folder with id 1999 and iterates through it)

I've also tried replacing the above let-statement with:

	<dtml-call "REQUEST.set('month', ZopeTime().month())">
	<dtml-call "REQUEST.set('year', ZopeTime().year())">

after which: 

	<dtml-var year> is 1999
and
	<dml-var month> is 10

but again after the above:

	<dtml-with "_[year]">

gives me:

           Error Type: SystemError
           Error Value: bad argument to internal function

So, apparently I do not know how to reference inside
folder X (with dtml-with) where X is the name of the folder
taken from property "year".

I am somehow not able to pass the contents of property "year"
to the <dtml-with> tag as an argument.

How do I accomplish this? 

Again, thanks for the input so far - it's been very helpful.

Best regards,
	Samu Mielonen