I've found the below to be true in both version 1.2 RC2 and RC3.

I have a simple controller Home that has $uses = null, as it does not
have any data associated with the page (It's a home page and very
boring right now).

In order to get some data into the view from another model (Category),
I am using the following (and dull) code in the file /controllers/
home_controller:

function index()
{
App::Import('Model', 'Category');
$category = new Category();
$categories = $category->findAll();
}

I have a simple ctp file: home/index.ctp that has static text within
it.

When the index function is empty (no code between the braces), the
static page appears correctly.
When the code is in place, nothing appears in the browser.

I have commented out everything except the first line (App::Import),
and everything is fine.
When the first two lines are uncommented, I get the blank page again,
so it seems as if there is something going on in the object
instantiation.

Based on what I read, I can't figure out what I've done wrong.  I'm
simply attempting to get data from the table 'categories' into the
controller so I can pass them on to the home/index page.

Any and all help will be appreciated.

Thanks in advance,
B.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to