Re: How to store position of current/active navigation entry

2013-08-10 Thread DJ-Tom
I now came up with this solution: path = req.get_full_path() if path.startswith(entry['href']): entry['active'] = True thanks for helping :-) -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this

Re: How to store position of current/active navigation entry

2013-08-05 Thread Bill Freeman
On Sun, Aug 4, 2013 at 6:39 AM, DJ-Tom wrote: > Hi, > > I don't think I know how to actually do what you are suggesting. > > Lets say I have three menu options with the following URLS: > > "One" - /one/show > "Two" - /two/show > "Three" - /three/show > > Currently I have

Re: How to store position of current/active navigation entry

2013-08-04 Thread Goran
There is no usual way to do this because you can have anything behind menu item. So here is what I do in the same situations. Let say that we have some categories listed in your navi. Every category must have unique ID so in navi view pass some variable with that ID for example "foo = entry.pk"

Re: How to store position of current/active navigation entry

2013-08-04 Thread DJ-Tom
Hi, I don't think I know how to actually do what you are suggesting. Lets say I have three menu options with the following URLS: "One" - /one/show "Two" - /two/show "Three" - /three/show Currently I have somthing like this in my main.html page template: {% if navi %} > {%

Re: How to store position of current/active navigation entry

2013-08-01 Thread Bill Freeman
One traditional place to store navigation state is in the URL. If you are reloading the page with a new GET (such as because a link was clicked), you have to indicate what page to load in the URL, whether in the path or in the parameters. The view has access to the URL, and uses it to know where

How to store position of current/active navigation entry

2013-08-01 Thread DJ-Tom
Hi, I'm currently creating a web app with django that will have a side bar menu with several sub-sections. I'm wondering if there is a "standard" way to store the "current" or "active" menu entry so I can highlite it in the menu area each time a request takes place. Is it possible to attach