Skip to content

Instantly share code, notes, and snippets.

@susanBuck
Created April 23, 2011 20:05
Show Gist options
  • Save susanBuck/938923 to your computer and use it in GitHub Desktop.
Save susanBuck/938923 to your computer and use it in GitHub Desktop.
loading alternative layout
<?php
class MembersController extends AppController {
var $name = 'Members';
var $helpers = array('Html','Javascript','Form','Time');
var $components = array('Session','RequestHandler');
var $uses = array();
function index() {
// Works, will load the ajax.ctp layout
// http://localhost/members/index
$this->layout = 'ajax';
}
function signup() {
// Does not work, loads the default.ctp layout
//http://localhost/members/signup
$this->layout = 'ajax';
}
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment