I have a 1st FilesController witch method index([option])
//=====/controllers/files_controller.php=======
class FilesController extends AppController{
var $name='Files';
var $uses = array('File', 'Comment','Tag');
var $components = array ('Pagination');
var $helpers = array('Pagination','html');
function index($sort=null){
if($sort=='top'){
}elseif($sort=='best'){
}else{
list($order,$limit,$page) =
$this->Pagination->init($criteria=NULL);
$this->File->unbindModel(array('hasMany' =>
array('Vote')));
$files = $this->File->FindAll($criteria=NULL, NULL,
$order, $limit,
$page,1);
}
$this->set('files',$files);
$this->render('index');
}
...
//==============end========
Can I use method form FilesController in HomesController ??
exp.
//=======/controllers/homes_controller.php====
class HomeController extends AppController {
var $name = 'Home';
var $helpers = array('Html','Javascript');
function index() {
$this->pageTitle = 'Home';
//exp.
$files->index('top');
}
}
//=======end===========
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" 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
-~----------~----~----~----~------~----~------~--~---