Skip to content

Instantly share code, notes, and snippets.

@mike1e mike1e/gist:7610855
Created Nov 23, 2013

What would you like to do?
Jinja2 / Bootstrap Navigation Active Page highlighting
<ul class="nav nav-pills pull-right">
{%- for endpoint, caption in [
('index', 'Index'),
('add_user', 'Add User')
] %}
<li{% if endpoint == request.endpoint %} class="active"{% endif %}>
<a href={{ url_for(endpoint) }}>{{ caption }}</a>
{%- endfor %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.