|
| |
|
|
pcguy
Posts: 137 From: None Status: offline
|
How to: dynamic sub-menu's? - 4/29/2009 15:13:01
Hi Folks, I'm redesigning an ASP site with Dreamweaver CS4, so I'll be sticking to using ASP technology.... The site will use horizontal navigation for the MAIN MENU which will be static, but each page therein will have a vertical sub menu, probably with 2-3 levels deep - which will need to be dynamic. I'm trying to figure out a good way to organize and maintain the submenus. I need each page to "know where it is" so the breadcrumb trail can be accurate and dynamic. The page/menu will also need to know how to display the correct submenu/level.....hopefully this all can be dynamic.... I also want to avoid query string parameters, such as page.asp?menu=1&submenu=3 type stuff..... My current thought is to use URL rewriting and a database - but I'm not sure if this is the best route.... Does anyone have any suggestions? HELP! Thanks!
|
|
|
|
pcguy
Posts: 137 From: None Status: offline
|
RE: How to: dynamic sub-menu's? - 4/30/2009 5:38:12
Yeah, I can see that getting kind of ugly....especially if you did it for the whole site... However, it might ok to have a separate include file for each folder below the root - I'll have to play with that... Thanks for the info...
|
|
|
|
clum1
Posts: 778 From: Glasgow, Scotland Status: offline
|
RE: How to: dynamic sub-menu's? - 5/4/2009 9:29:06
I've just done something similar with my intranet's menu system; I've used Request.ServerVariables("SERVER_NAME") to create a "root" address for each link and it's cut down a lot of the kludge:
CurrServerName = Request.ServerVariables("SERVER_NAME")
RootAddress = "http://"&CurrServerName&"/intranet/"
So, for instance, a hyperlink becomes: <a href="""&RootAddress&"contacts/"" title=""Staff Details"">Contacts</a> so each actual address is just it's relative path and I can use the same menu for my dev server and production one... It's been a real boon - previously I had my menu system using FP include files which took an age to update; now one ASP page handles the lot. I played around with the idea of using a database but it didn't really offer me anything. In the end I plugged it into a heavily adapted version of this JS dropdown menu.
_____________________________
kenilweb.com; simple, effective web design "So I said to the Gym instructor "Can you teach me to do the splits?" He said "How flexible are you?". I said "I can't make Tuesdays"." Tim Vine
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|