Custom static layout
i want to add static html page layout for my application (advanced search layout).
i would like that it will be accessed by url http://myapp/search
tryed to create custom controller (search_controller.php) and index view (view/search/index.开发者_如何学Pythonctp), but cake requires database table search.
also, followed info from
http://cake-php.blogspot.com/2006/09/21-things-you-must-know-about-cakephp.html
but no luck.
so, can you help me how to create custom layout in php.
thank you in advance!
"tryed to create custom controller (search_controller.php) and index view (view/search/index.ctp), but cake requires database table search."
Not so - you can make the model table-less by using the class variable:
var $useTable = false;
If you don't wish to use a Model, in the controller set:
var $uses = array();
You should be able to manipulate the url using app/config/routes.php and/or .htaccess.
精彩评论