[Solar-talk] Using fetch
Richard Thomas
lists at cyberlot.net
Wed May 7 23:55:51 CDT 2008
Solar::autoload('Solar_Controller_Page');
class App_Index extends App_Base {
protected $_layout = 'default';
protected $_action_default = 'index';
public $output = '';
public $login_box = '';
public function actionIndex() {
if(1 == 2) {
$this->login_box = $this->fetch('loggedout');
} else {
$this->login_box = $this->fetch('loggedin');
}
$this->output = 'TEXT_EXAMPLE';
}
}
The above code gives a seg fault..
class App_Index extends App_Base {
protected $_layout = 'default';
protected $_action_default = 'index';
public $output = '';
public $login_box = '';
public function actionIndex() {
$view = Solar::factory('Solar_View');
if(1 == 2) {
$this->login_box = $view->fetch('loggedout');
} else {
$this->login_box = $view->fetch('loggedin');
}
$this->output = 'TEXT_EXAMPLE';
}
}
Gives me a template not found, tracking that down it looks like the
stack hasn't been setup yet and the template_stack array is empty so it
can't find anything..
I know I am doing something really stupid just can't figure it out for
the life of me at the moment.
More information about the Solar-talk
mailing list