views:

46

answers:

1

I am passing variable to template in web.py and have the same condition in some places. Like this:

$if myvar=="string1":

$passed argument1

............

$if myvar =="striung2":

$passed argument2

If say myvar is "string1" and I pass passed = "AAA" then I have AAA argument1 on my page, but the other if statements get replaced by empty string?

How to avoid that? I.e. how to leave other statements intact?

A: 

Your question is unclear. What are you trying to do? It sounds like you just need to use else:

if myvar == "string1":
  print passed
else:
  # something

But it's very hard to understand what you are asking.

Virgil Disgr4ce