python - Bottle - current tab highlighting -


i want tabbed navigation site i'm building, unsure of how implement in bottle.

here's direction i'm going in (from .tpl file):

<li {{!'id="active"' if true else ""}}><a href="/">index</a></li> <li {{!'id="active"' if true else ""}}><a href="route1">route1</a></li> <li {{!'id="active"' if true else ""}}><a href="route2">route2</a></li> <li {{!'id="active"' if true else ""}}><a href="route3">route3</a></li> 

i need replace true condition compares current route string. how do that? looks need pass current route views, couldn't find concrete answers.

also open better ideas. instance, saw done like this, that's in different framework.

thanks.


Comments

Popular posts from this blog

php - Permission denied. Laravel linux server -

google bigquery - Delta between query execution time and Java query call to finish -

python - Pandas two dataframes multiplication? -