[Zope] Missing Variable

Dustin Mitchell dustin at ywlcs.org
Sun Aug 17 13:15:36 EDT 2003


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 at ywlcs.org/djmitche at alumni.uchicago.edu
  http://people.cs.uchicago.edu/~dustin/
  PGP Key: http://people.cs.uchicago.edu/~dustin/pubkey.txt                                                                                  



More information about the Zope mailing list