[thelist] Looking for dynamic menus for ASP pages

Peter Brunone (EasyListBox.com) peter at easylistbox.com
Wed Jul 28 09:30:57 CDT 2004


Rob,

	Assuming you're serious about this (if not, I apologize for
misinterpreting your sarcasm), I don't think the model below is the best
solution.  You might do better to have a Users table and an Areas table,
and then a table between them that associates one UserID to one AreaID
in each record.  That way, you can easily add all the combos you need,
and keeping track of them is as easy as a single select query.

For what it's worth...

Peter

-----Original Message-----
From: thelist-bounces at lists.evolt.org On Behalf Of Rob Smith

<snip />

When I started developing this thing many moons ago, I just couldn't
bring myself to create 50 some-odd columns, one for each user group. I
should have. In a way, now that I think about your suggestions, I think
that would work nicer and bring in what you talked about; a matrix if
you will:

User | All  |  Region  |  State  |  City  |  Section of Town
-----+------+----------+---------+--------+-------------------
 A   |  x   |          |    x    |        |        x
-----+------+----------+---------+--------+-------------------
 B   |      |     x    |    x    |    x   |                   
-----+------+----------+---------+--------+-------------------
 C   |  x   |          |    x    |        |        x
...and so on. and now the menu table...
Page | All  |  Region  |  State  |  City  |  Section of Town
-----+------+----------+---------+--------+-------------------
 1   |  x   |     x    |    x    |        |        
-----+------+----------+---------+--------+-------------------
 2   |      |     x    |         |    x   |        x           
-----+------+----------+---------+--------+-------------------
 3   |  x   |     x    |         |        |        x
...all you'd have to do at this point, is mentally lay one over the
other. Where ever the x's match, a menu item is created.

By this above random example:
User A can see (All, State) on Page 1
User A can see (Section of Town) on page 2
User A can see (All, Section of Town) on page 3
User B can see (Region, State) on Page 1
User B can see (Region, City) on page 2
User B can see (Region) on page 3
User C can see (All, State) on Page 1
User C can see (Section of Town) on page 2
User C can see (All, Section of Town) on page 3

Thanks, I'll put this into the next version,

Rob
-- 




More information about the thelist mailing list