kiz
Junior Member
Posts: 2
Registered: 7/6/2004
Member Is Offline
|
| posted on 7/6/2004 at 03:31 AM |
|
|
Concatinate menu variables
I would like to have a menu that changes based on whether a user is logged in or not, by adding some additional parts. I don't want to define 2
full menus, but instead use one MENU_ITEMS with the normal menu, and MEMBER_MENU_ITEMS with just the additional parts at the end - and concatinate
them.
I thought something like MEMBER_MENU_ITEMS = MENU_ITEMS.concat(MEMBER_MENU_ITEMS);
would work - and it does in Safari, but not in IE.
Any ideas how to do this?
Thanks.
|
|
|
tigra
Administrator
Posts: 1976
Registered: 6/17/2002
Location: US, CO
Member Is Offline
|
| posted on 7/6/2004 at 04:17 AM |
|
|
For security reasons I'd recommend to switch hierarchies on the server side. In your case information about member menu items will be available
to non-members, it may be not shown in the menu but accessing it is not a big deal.
|
|
|
kiz
Junior Member
Posts: 2
Registered: 7/6/2004
Member Is Offline
|
| posted on 7/6/2004 at 11:09 AM |
|
|
Good point - thanks for your quick response. I was making the switch on the server side, but I realise now that the entire MEMBER_MENU_ITEMS would
have been passed in all cases. Now I will make it more secure by only including the MEMBER_MENU_ITEMS when the user is looged in.
I would still like to generate this variable via concatination of other menu items variables as described in the original post. Is this possible?
|
|
|