SmartRedirect Plugin for CakePHP

When adding, editing, or deleting records in a web application, it is common to return the user to where they originated. That is what they typically expect. The SmartRedirect plugin allows just that, without any coding in your models, controllers, or views.

You can grab the plugin using git or by zip from the SmartRedirect Plugin project page on GitHub.

All you need to do is extract the file and drop the smart_redirect folder into your app/plugins directory. After that, add SmartRedirect.AutoReturn to your components list. Something like this:

var $components = array(‘SmartRedirect.AutoReturn’);

Now when you add, edit, or delete records in your application, you’ll be returned to the page you were on before.

The plugin does use a custom view, so may conflict with other plugins such as Debug Kit.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.