On Aug 22, 9:16 pm, Matt Haggard <[EMAIL PROTECTED]> wrote: > I'm becoming accustomed to Django... and I have a design question: > > I have something like this: > > Page1 > - Subpage 1 > - Subpage 2 > - Subsubpage 1 > - Subsubpage 2 > - Subpage 3 > > And I want to create a navigation bar that provides links to the > current page and all of the parent pages. You have to write recursive (or sort of) function to do something like this. > I'm using Django 0.96. I've played with the url template tag, and I > don't understand what permalink() does. permalink is a way to change the behaviour of the get_absolute_url so that you don't have to return the url, but the data that django need to guess which url is the good one for this object... > Can anyone offer any > suggestions? Specifically, where do I put what? I want to have all > the layout of the page preferably in urls.py you don't have to change urls.py, all you have to do is to use permalink in your views > I've thought of passing a "nav" variable to the templates that > originates from urls.py, but {% url %} doesn't accept strings, so that > doesn't work. ??? You may consider creating a django template tag to create the navigation bar, because even if is not too complex, it's a bit too much of "logic" for the template. please use search engines [1] suscribe to django weblog & django community planet, digg the django trac sometimes they are tips how to get working things whatever the google search bring me there most of the time. [1] http://collingrady.com/2007/02/15/django-permalink/ this is how I understood, 3rd link in google: permalink django blog --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---