[Zope] Including Script-Generated String in Method Call

Bak @ kedai kedai@kedai.com.my
Sun, 30 Dec 2001 14:14:59 +0800


I have been chasing my tail on this one for the better part of two
hours now. Time to ask for help.

My goal:

I want to load a page whose URL looks like "day1.html" where the
number in the name of the page changes.

I have written a Python script called pagetoget which calculates the
day number correctly and assembles the URL as a string, which it
returns. This seems to work.


----
what you can try:
<dtml-var "_.getitem(pagetoget)">

checkout dieter's chap3 in his book available on the net (search the archive
for the url)

to redirect, you can do this
<dtml-call "RESPONSE.redirect(pagetoget)">

rule # 666 in the road to zen:  no dtml in dtml
rule #69 states : if in " ", you're in python realm.
:)

hth