I'm just going to go with nav blocks for the time being and find something dynamic later... I was looking at Jquery json cookies but seems a lot of effort for a small menu very interesting about context variables, I'll look into this ;)
Thanks On Jul 15, 5:15 pm, David De La Harpe Golden <david.delaharpe.gol...@ichec.ie> wrote: > On 15/07/10 16:31, justin jools wrote: > > > I thought I had solved but I haven't. > > [...] > > using seperate block nav for evey page seems like a lot of > > duplication... > > Well, you could also pass through a context variable to the template > from each of your view functions telling what item in your navbar to > make current, you don't need to do the "{%with ...%}{{block.super}}" > hack I showed, that just helps make which navbar item is current a > "purely in the templates" issue, which is potentially handy. > > i.e. in your view you might do something like > > return render_to_response('blah.html', > dict(nav_current='blah',...), > context_instance=RequestContext(request)) -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.