Skip Navigation

Reason inline editing updates

March 8, 2010 at 3:54 pm
By nwhite

Inline editing in Reason has been more fully implemented, and template cruft removed. There is no longer any direct connection between a template and support for inline editing - it is entirely module based.

There is a session based option near the login box to turn inline editing on or off. A module can determine who has inline editing privileges. Individual modules can be updated to support inline editing. The only Reason core module that implemented front end editing has been the content module - it will now support inline editing for site users (as before) but also for Reason site administrators. This provides an easy way to change page content for site administrators without going into the Reason administrative interface.

If a reason instance has modules outside of the core that implemented front end editing, or if custom templates completely override "run_section" or "load_modules," lost functionality or warnings could be an issue.

  • the template no longer calls the module method init_editable
  • the template no longer calls the module method can_edit
  • the template no longer calls the module method run_editable
  • a template instance no longer has the "editable" property
  • the session is not always localized to a module and accessible with this->session (used to happen in init_editable)

I'll be writing up a document with a basic tutorial on inline editing and will update this document when that is available. In the meantime, the code for the content.php module (EditableContentModule) is a good examples of a basic implementation of inline editing.

Add a comment

Name*
Comment*
The following fields are not to be filled out. Skip to Submit Button.
Not Comment
(This is here to trap robots. Don't put any text here.)
Not URL
(This is here to trap robots. Don't put any text here.)
Avoid
(This is here to trap robots. Don't put any text here.)