Re: Determining the active urlpattern for navigational templates

2008-10-18 Thread Jesse Young
Hi Nathaniel, I just cleaned up my implementation and posted it (along with some usage notes) at http://demo.apture.com/demo/ifactive.py . I modified it from my original implementation, so now it doesn't require patching Django. It does require adding a middleware class, though. Although, if

Re: Determining the active urlpattern for navigational templates

2008-10-17 Thread Jesse Young
Hey Steve, Thanks for the suggestions. Setting aside the matter of using extends vs. include, or using data-driven menus vs. hardcoded menus, the key issue is how to figure out which of the links corresponds to the current page. >From your code sample, it looks like you're comparing

Re: Determining the active urlpattern for navigational templates

2008-10-16 Thread Steve Holden
Jesse Young wrote: > I'm guessing it's somewhat common (as usual, I think it's common > because I do it) to put several navigational links in a template that > is included from several other templates, e.g.: > > Page 1 > Page 2 > ... > Page N > > But also, it's helpful to indicate where the user

Determining the active urlpattern for navigational templates

2008-10-16 Thread Jesse Young
I'm guessing it's somewhat common (as usual, I think it's common because I do it) to put several navigational links in a template that is included from several other templates, e.g.: Page 1 Page 2 ... Page N But also, it's helpful to indicate where the user currently is in the navigational