Development

CakePHP 1.2 stable released!

Posted in CakePHP, Development on December 26th, 2008 by Steve – Be the first to comment

CakePHP 1.2 stable has now been officially released! Check it out along with a list of features 1.2 has to offer.

CakePHP RC4 released!

Posted in CakePHP, Development on December 19th, 2008 by Steve – Be the first to comment

The Cake team has just released RC 4 for the CakePHP 1.2 release. Looks like many bugs were fixed and we’re very close to seeing stable released in the near future.

Don’t forget to donate to the CakePHP team for all their hard work in maintaining this great framework.

Overriding CakePHP’s controller::flash() method

Posted in CakePHP, Development on December 15th, 2008 by Steve – Be the first to comment

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.

CakePHP 1.2 RC2 is available!

Posted in CakePHP, Development on June 29th, 2008 by Steve – Be the first to comment

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.

Playing with Cake RC1

Posted in CakePHP, Development on June 16th, 2008 by Steve – Be the first to comment

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