Archive for the ‘jQuery/javascript’ Category

AJAX pagination with jQuery and elements

A simple way to get your paginated data in your view through ajax with jQuery. Thanks to Cesay Dreier and his article at the bakery http://bakery.cakephp.org/articles/view/easy-ajax-pagination-using-jquery.

I changed the code a bit because I use elements in an extensive way. So here is almost the same code but now with an element and some updated javascript code.

I used the latest CakePHP 1.2.5 and did nothing to the layout. So the classes or id’s will be of the default CakePHP layout. I added the blog tutorial posts table and some data.

1. Add to your controller (or AppController):

// my posts controller looks like this
class PostsController extends AppController {
	var $name = 'Posts';
	var $components = array('RequestHandler');
	var $paginate = array('limit' => 10);

	function index() {
		$this->Post->recursive = 0;
		$this->set('posts', $this->paginate());
	}
}

(more…)

Improved music site: Cloudspeakers.com

cloudspeakersOne of the CakePHP projects I have is the site named Cloudspeakers.com. In the last three months we improved the website with new features, gave it a complete new layout and did a lot about the usability.
All is build on the latest stable CakePHP core 1.2 and jQuery 1.3

Read full press release here: http://bit.ly/4zUxj2