I have this model ‘Comment’ with controller ‘CommentsController’ and different views for ‘add’, ‘edit’, ‘delete’ functions that is being viewed on default.ctp layout. But I want to create another model which is a ‘Login’ model with ‘LogInController’ controller and different views for validation. I want this to be viewed of course on another layout that will be the interface of the login panel. But how can I create another layout for that? whenever I am viewing this log in view it is always appearing to the default.ctp layout.
I have this model ‘Comment’ with controller ‘CommentsController’ and different views for ‘add’, ‘edit’,
Share
in your
logins_controller.php, specify a different layout:Then create
APP/View/Layouts/login.ctpfor yourlogin.ctphtml etc