I am trying to set a base django template whose navigation elements will highlight when they are active. I have tried the following posts to create a templatetag to append an active value to the markup:
110j's answer to this Stack Overflow Question (not the accepted answer)
Both are suggesting using a templatetag to check if user is on selected page, then use that to add an active value to the navigation in the template. However, I get an AttributeError
saying that: 'str' object has no attribute 'path'
. After searching, I cannot figure out how to remedy this problem..
How do I achieve the most de-coupled method of highlighting active navigation on Django 1.4.2 + python 2.7? Thank you very much for your input!