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

cookies - Yii2 Advanced - Share session between frontend and mainsite (duplicate of frontend for www) -

angular - password and confirm password field validation angular2 reactive forms -

php - Permission denied. Laravel linux server -