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 foreground image, you can just do:
<img src="...news-archive{{in_news_archive}}.gif">
and that selects one of two images.

Another way of using this is to have two style rules defined with
different properties. E.g.,
.news-archive { background: url(news-archive.gif);}
.news-archive-active { background: url(news-archive-active.gif);}

and then in your HTML you have something like ...
<a class="news-archive{{in_news_archive}}" href=...>

 Peter
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to