Please, Advises About A Dynamic User Menu

Hi all,

I have been thinking about how to create a dynamic user menu and I’m not really sure about what approach is better, I will try to explain myself…

Once the user is logged in, I redirect to his control panel, this is a page where only the logged user can view and where the dynamic user menu is placed on left side.

Lets say the user can create ads and view a list of his ads, when the user selects some advertisement, the dynamic menu must be loaded with actions like update, delete or view, where of course, I need the advertisement ID to be passed to action controller, the user can select a different advertisement and then the dynamic menu must be loaded with the actions related to the selected advertisement.

So… I don’t know what is the best approach… I tried to call a js function when a view is loaded after the user select an advertisement, but the menu appears after the whole page is rendered.

Another thing that I’m sure is if its correct to pass the ids in the URL, because I don’t want that some user changes the URL changing the id and may view other user information, is it better maybe to only send it by post request?

I hope I have explained correctly, sorry for my English…

Thans for your tips!

look at this wiki dynamic sidebar ; may give you some idea :lol:

pass the id with url is necessary sometimes . whether use the POST you should analyze your request. if it is a query you 'd better use GET , if it is a command (have some effect on the server and cause some status chaged ) you should use the POST (DELETE PUT )

Oh man… you made my day! that article is wonderful! so many thanks, I already coded and it works smooth as silk