Re: awareness of current view in template/site navigation

2008-04-21 Thread Peter Rowell
There are any number of Cheap Hacks you can do to make this simpler. In the view (or possibly using the {% expr %} tag (See http://www.djangosnippets.org/snippets/9/)), set a variable called in_news_archive to "-active" if you are in that section, and '' or None if you aren't. If this is a

awareness of current view in template/site navigation

2008-04-21 Thread Aljosa Mohorovic
i often find myself thinking "there must be a better way" when creating site navigation that has different images for normal/active/ hover link. so if my current location is "/news/archive", what i usually do is: - define current_view="news_archive" as variable for template - in template,