First, create a model with the $useTable = false declaration:
app/models/mypage.php
<?php
class MyPage extends AppModel {
var $useTable = false;
}
?>
Then, define an empty action in a controller, like
app/controller/mypage_controller.php
<?php
class MyPageController extends AppController {
var $uses = array('MyPage');
function index()
{
}
}
?>
and place all the static stuff in a view
app/views/mypage/index.ctp
<h1>Welcome to my static page in CakePHP!</h1>
Et voila!
exceljava pisze:
> hi, i am a newer with cakephp,i want to generate a static html page
> when from controller to views, how can i do?
> thanks!
>
> >
>
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---