Is it possible to load menu Url’s and attributes from a database?
I am building a site that will incorporate dynamic news sections and it would be great to include new news items into the menu without having to re-edit the menu.
I am using Access and ASP.
I’ve currently finished an ASP – SQL2000 driven menu. I run it off one table and one query.
The table will need at the minimum: –
The SQL or Query for the root menu items: –
Then: –
For the submenus..
Finally the ASP (oMenuRoot is the recordset for the ROOT menus, oMenuSub is the recordset for the SUB menus: –
This is draft working model, but works without problems, you could improve by using one SQL query and writing all the output inside ASP markup.