Hide
on 23/9/06

A brief not to say that I'll be putting a couple of Demos back on the site, and I'll be adding to the main demo page as I go. All of the demos will be put up as plugins.

The pagination demo and source has always been available, and adding to that, the the next example is the Title tutorial. A very simple example based on the original tutorial from the wiki demonstrating the use of associations, requestAction, class/method inheritance and AJAX.

Next on the list is to tidy up and make useful the ajax-chat that I wrote a while back, with any luck that will pop up tomorrow.

on 5/9/06

Routes are a great feature, but if you try using them with Plugins you might find that you start pulling your hair out. Fear not however, there's always a solution and it's usually not that difficult. If you use routes of the form below, you can map directly to a plugin's page:

[Code]

Easy when you know how.

One word of warning though, the first parameter in this route has a default which is the controller action. This means that if you create route which expect parameters (as I did in the example) it will work with no parameters, but if any parameters are passed the first one will be understood to be the method name.

on 18/8/06

If you use plugins, you may have noticed that your app session data isn't avaialbe in your plugins and vice-versa. There's a good reason for that, as a plugin is intended to be a mini application, self contained etc.

In my case, this was a problem as my plugins are extensions or parts of my application and not seperate. To get around the wandering session data it was necessary to copy the session helper from cake/libs/controllers/components/ to /app/controllers/components and change this line in the constructor method: