Hi all
I'd like to start a discussion about generating navigation components.
Despite their importance and their fairly generic nature, best
practice is not obvious to me after trawling through hundreds of
posts, blogs etc.
Anyone that's interested, could you briefly state how you do it,
perhaps answering the following questions?
A. Where do you get the information about the site structure?
E.g. Do you just have a static include file, perhaps store it in
the db, or work it out from URL confs?
B. How do you deal with indicating the current page in the nav
component?
This is what I'm thinking of doing -
A. Generate a two level nav component from my URLConf file, then cache
it heavily. I'm looking at using the name from named url patterns to
populate the anchor lables.
B. Use javascript (window.location.href or something) to change the
class of the current page element. This will be much quicker to
implement and not too obtrusive on failure.
Cheers,
Will T
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---