Essais avec ca :
function category($slug){
$cat = $this->Post->Category->find('first',array(
'conditions' => array('slug' => $slug)
));
$this->loadModel('CategoriesPost');
$catpost = $this->CategoriesPost->find('all',array(
'conditions' => array('category_id' => $cat'Category']'id'])
));
$d = array();
foreach ($catpost as $c){
$this->Post->create();
$d'posts']] = $this->Post->find('all',array(
'conditions' => array('id' => $c'CategoriesPost']'post_id'])
));
//debug($d);
}
$this->set($d);
$this->render('index');
}