Blog Sections Open

Always Stay: Keeping the Manager in Edit Mode After Save

A small manager plugin pattern that changes the default save behavior so editors stay on the current form instead of being bounced back to the list.

By default, classic manager save actions often returned editors to the listing view. That made sense for quick edits, but it was frustrating for longer work on resources, templates, snippets, chunks, and plugins.

The donor solution

A lightweight plugin listened to several form-render events and changed the default save-mode value to “stay”.

if ($e->name == 'OnDocFormRender' ||
    $e->name == 'OnTempFormRender' ||
    $e->name == 'OnChunkFormRender' ||
    $e->name == 'OnSnipFormRender' ||
    $e->name == 'OnPluginFormRender') {
    $html = "<script type='text/javascript'>if(!$('stay').value) $('stay').value=2;</script>";
    $e->output($html);
}
Newer post

Changing One TV Dynamically When Another TV Changes

A manager-side pattern for making one TV field react to another, useful when the second field depends on a section chosen in the first field.

Older post

Running the Evolution CMS Manager on a Subdomain

A deployment guide for placing the manager on a dedicated subdomain while keeping the frontend site and file structure stable.