On 2/21/06, coulix <[EMAIL PROTECTED]> wrote: > > i have this website : > http://ozserver.no-ip.com:345/cefinban/recette/1 > i would like to highlight the menu link representing the current page, > for example if its "contacts" , the ">> contacts link in the menu > should be bold. > > using template i could load a different menu block for each page ? :/ > any other way ?
Probably not the most elegant solution, but I have some models for Menus, NavItems (menu children), and Content (generic stub that can link to any object). You can actually nest menus for top menu/side menu type arrangements (more levels should work, if you're so inclined). Then I add some template tags to build/retrieve a navtree from the templates. It assumes access to the current object in the template so it can compare contentid's of items in the navtree, and adds a flag for items (or parents of items in the navigation tree) that are "current". Possibly more complicated than you want, we wanted the client to be able to edit the menu structure through the admin interface, so this solved that as well. See http://wel.obsidian.com.au for an example (site not live yet). -David --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---