CakePHP 1.2 stable released!
Posted in CakePHP, Development on December 26th, 2008 by Steve – Be the first to commentCakePHP 1.2 stable has now been officially released! Check it out along with a list of features 1.2 has to offer.
CakePHP 1.2 stable has now been officially released! Check it out along with a list of features 1.2 has to offer.
If you’re not satisfied with the way Cake’s flash method works, you can easily override it in your AppController class. At the moment, the default flash method takes you to a blank page only displaying the flash message. You are then redirected to the redirect url you provided. The way I prefer flash to work is to immediately redirect the user and show the flash message on that page. This can be easily achieved by by going into app_controller.php and adding the following couple of lines:
function flash($message, $url="/") { $this->Session->setFlash($message); $this->redirect($url); }
You will then need to modify your layout.ctp to display the flash message whenever it is set. To do this, you’ll need to add the following lines:
if ($session->check('Message.flash')) : $session->flash(); endif;
That’s it. No need to hack cake’s core files and no need to create a custom method when you can override the existing one.
The cake team is working rather quickly. They have released Cake 1.2 release candidate 2 on June 27th. Time to upgrade once again! The goodness just keeps coming.
CakePHP RC1 was released on June 4th. At the moment I haven’t had much time to play with it as I wrap up a few projects using 1.2 beta. One thing I did notice was their inclusion of the Containable Behaviour. This is a powerful behaviour that helps in limiting the data you want to grab from your models. I’ve used both Mariano’s and Felix’s behaviours and I’m glad those forces were combined to produce this, and then some.
This weekend I’ll be upgrading my client sites to RC1 and hopefully all will go well. For information on what’s new in RC1, visit the bakery