i have done some tutorials
the scaffold works fine
when i want to create my own view
nothing is echoed here is the controller:
<?php
class ProductsController extends AppController {
var $name = 'Products';
//var $scaffold;
function index() {
$this->set('products',$this->Product->find('all'));
}
}
?>
and the products/index.ctp view
i get the hello and nothing blank screen with the default
cake layout
the code:
<?php echo'hello';?>
<html>
<head>
<title>test title</title>
</head>
<body>
<div id="container">
<div id="content">
<?=$content_for_layout;?>
<?php echo $product['Product']['id']; ?>
</div>
</div>
</body>
</html>
i get this error
Notice (8): Undefined variable: product [APP\views\products\index.ctp,
line 11]
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---