views:

26

answers:

1

I'm new to Django, so apologies in advance if this is a rookie issue.

Basically, I am passing a list of objects ('tags') to a template and would like to create the following display:

tag1> tag2> tag3

where

I cannot for the life of me figure out how to create the three links, for any given list of 'tags' objects passed to the template, since the obvious solution of a path_string variable that gets updated with every for loop pass cannot work, because variables cannot be declared/ modified in Django templates.

I looked up some advanced templates topics, and tried messing with filters etc. but didn't make any headway. Any suggestions?

+1  A: 

These are called breadcrumbs. Try this http://stackoverflow.com/questions/826889/how-to-implement-breadcrumbs-in-a-django-template or this http://code.google.com/p/django-breadcrumbs/ or this http://www.martin-geber.com/thought/2007/10/25/breadcrumbs-django-templates/

Matt Williamson
Seems to be exactly what I was looking for. Thanks Matt! Onward to implementation...
Rahul
Certainly, have fun :)
Matt Williamson

related questions