Hi,

Kenneth Gonsalves wrote:
> in a zpt, i use tal:condition to check something. If it is true, the 
> browser should redirect to another template. How do it do this? In 
> python cgi i was doing:
> 
> print "Location:" "url_to_go_to/n/n"
> 
> any clues?
> 

- Define each template (for your set of conditions) as a macro.

- In your page, use tal:condition to call the appropriate macro for the
conditions.

You'll find tal:condition-ally calling macros easier to follow than a
redirect. If you must use a redirect, I'd implement the redirect in a
script and conditionally call the templates form the script...


-- 

Regards,

PhilK

Email: [EMAIL PROTECTED]
PGP Public key: http://www.xfr.co.uk
Voicemail & Facsimile: 07092 070518

"You'll find that one part's sweet and one part's tart:
say where the sweetness and the sourness start."
- Tony Harrison
_______________________________________________
ZPT mailing list
ZPT@zope.org
http://mail.zope.org/mailman/listinfo/zpt

Reply via email to