⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

Show edit mode on some views.



Jack Uw
  • profile picture
  • Member

Posted 25 January 2013 - 09:12 AM

[EDIT] See the post after this first post. I found a nice way to do EXACTLY what i wanted [/EDIT]

Let´s say that i have a config stored in a MySQL datase. Then the user should only see the Edit state. Because i don´t wan´t the user to add a new record.

From what i understand you can solve this by re-routing in codeigniters URL. So that shouldn´t be any problem. The problem is that when i update (edit) the record a "Your data has been successfully updated. Go back to list" message shows up where "Go back to list" is a link to the list state. Can i prevent this somehow? Also the button "Update and go back to list" isn´t necassary when you have one record.

Is there a way to make this work? Like remove this stuff (the button and link) in some views?

Or is there are better way for when you have 1 record that should show up in edit state and never in list state?

Jack Uw
  • profile picture
  • Member

Posted 25 January 2013 - 09:57 AM

Never mind!

I found out a nice way to do this. unset_back_to_list and unset_list. Kudos to the devs for thinking of this!