Hi Jiri!

if you are only about highlighting of the active item of your UI menu
in pure CSS way,
I suggest you to look at solution of www.djangoproject.com site,
the source of templates is:
base template:
http://code.djangoproject.com/browser/djangoproject.com/django_website/templates/base.html

===
...
 <body id="{% block sectionid %}generic{% endblock %}">
...
<ul id="nav-global">
<li id="nav-homepage"><a
href="http://www.djangoproject.com/";>Home</a></li>
<li id="nav-download"><a
href="http://www.djangoproject.com/download/";>Download</a></li>
<li id="nav-documentation"><a
href="http://www.djangoproject.com/documentation/";>Documentation</a></li>
<li id="nav-weblog"><a
href="http://www.djangoproject.com/weblog/";>Weblog</a></li>
<li id="nav-community"><a
href="http://www.djangoproject.com/community/";>Community</a></li>
<li id="nav-code"><a
href="http://code.djangoproject.com/";>Code</a></li>
</ul>
===

every child template (each for every menu item defines sectionid which
is used for css selection):
http://code.djangoproject.com/browser/djangoproject.com/django_website/templates/base_community.html
===
{% block sectionid %}community{% endblock %}
===

the most important is css it is not in svn, but you can observe it
online
===
/* NAV */
#homepage #nav-homepage a, #overview #nav-overview a, #download
#nav-download a, #documentation #nav-documentation a, #weblog
#nav-weblog a, #community #nav-community a, #code #nav-code a {
color:white; background:#092e20 url(../img/site/nav_bg.gif) bottom
repeat-x; }
===

but this solves your problem  if you have a special template for every
menuitem

no python code and very elegant :)

cheers

Reply via email to