How can I make a variable default to a value? if country is passed in my the URL (show_depot?country=France) then request/country is France and that's great but if the ZPT is called with no country ie just it's URL show_depot then I would like to set a variable country="Manager" Any pointers... Simon
On Sun, Aug 17, 2003 at 02:44:23PM +0100, Simon Faulkner wrote:
How can I make a variable default to a value?
if country is passed in my the URL (show_depot?country=France) then request/country is France and that's great but if the ZPT is called with no country
ie just it's URL show_depot then I would like to set a variable country="Manager"
Any pointers...
How about: <xxx tal:define="country request/country | string:Manager"> Country: <span tal:content="country" /> </xxx> I'm a beginner at all this too, so please correct me if I'm wrong. Dustin -- Dustin Mitchell dustin@ywlcs.org/djmitche@alumni.uchicago.edu http://people.cs.uchicago.edu/~dustin/ PGP Key: http://people.cs.uchicago.edu/~dustin/pubkey.txt
participants (2)
-
Dustin Mitchell -
Simon Faulkner