This topic is locked

Menu Linking To Edit Record

6/12/2013 12:05:27 AM
PHPRunner General questions
I
indigo author

Hi,
I have the following menu structure --
My User profile (Edit/View only)

My Assessment details (Edit / View only)

My orders (List/Edit/View)
etc etc
For the first 2 Menu items, can the menu link directly to the logged user's record etc? Maybe using Session Variables + record id? Each user will have only one record.

Menu builder doesn't have linking to "edit" page.
Is there a better way of doing this without using list pages?

C
cgphp 6/12/2013

You can't add php in the menu editor but you can add the logic in the "Before SQL query" event. Add a WHERE clause to filter the current logged in user.

Sergey Kornilov admin 6/12/2013

Check ModifyMenuItem event:

http://xlinesoft.com/phprunner/docs/menu_item_modify.htm
You can use setUrl() function to modify the URL of any menu link. I guess you will need to save the ID of user account record in session variable in order to use it in this event.