I have this on my controller:
class EmployeeAccountsController extends AppController
{
var $layout = 'login';
public function login()
{
}
public function main_board()
{
}
}
what I want to do is that to assign different layouts when I call the view for login() and the view for the main_board.
login() must have layout:login.ctp
main_board() must have layout:main_board()
is it possible for a single controller to have different layout?
Yes it is, and callback beforeFilter into your controller like:
In this case EmployeeAccounts controller will have login layout for all views.
EDIT: just define layout especially for action