does anyone know if there is a variable that template view php script can see and use to determine what crud function is being executed (ex: add, edit, etc.)?
variable available in template identifying current function?
- Single Page
Posted 12 June 2013 - 12:58 PM
Posted 12 June 2013 - 13:55 PM
update
i'm just trying to hide a mainMenu element on the edit screen.
obviously i can use the approach coded below but wondering if there is a cleaner way than this somewhat messy technique:
Posted 12 June 2013 - 14:41 PM
Use the getState to determine from the controller the state you are on.
After that depending on the way your project is structured you can change the display of the menu from the controller itself or via passing some variable on the view and checking there.
Myself I prefer to handle stuff like menu alteration, breadcrumbs and use access from the controller and amend the outputed data accordingly.
Posted 12 June 2013 - 18:26 PM
sure.
i've avoided using getState because of the empty doco page for getStateInfo
Posted 13 June 2013 - 07:43 AM
You don't need to do anything with the getStateInfo actually!!!