Re: 2 Models 1 Layout

2007-12-13 Thread Fabian
oh yeah I just left my post controller as it was doh! Thanks a lot!! On Dec 13, 3:23 am, MrTufty <[EMAIL PROTECTED]> wrote: > At a guess, I'd say that your /posts/index action isn't returning > thedatacorrectly. > > This is roughly what it should look like: excuse the dodgy formatting. > > clas

Re: 2 Models 1 Layout

2007-12-13 Thread MrTufty
At a guess, I'd say that your /posts/index action isn't returning the data correctly. This is roughly what it should look like: excuse the dodgy formatting. class PostsController extends AppController { ... snipped ... function index() { $posts = $this->Post->findAll(); if(isse

2 Models 1 Layout

2007-12-12 Thread Fabian
Hi All, I'm trying to gather data from 2 different models (2 different tables) and I want to place them on my layout. I read something about using a requestAction so I did the following: function index() { $this->set('archives', $this->Archive->findAll()); $this->set('pos