dwsla/slender-cms — pull request #4 by jsamos (2013-07-08 21:02:33+00:00)
Title: allow template to be set by extending classes

This commit will allow for the following

public function __construct(){

parent::__construct();

// NOW create will return template 'projects/new', and show 'projects/edit'

$this->setViewTemplates(['create' => 'projects/new', 'show' => 'projects/edit']);

}

public function show($id)
{

//the show view has additonal data requirements, so add them to the view

$taskOptions = $this->api->getOptions('tasks', ['created_at', 'updated_at']);

return parent::show($id)
->with('site', $this->site)
->with('taskOptions', $taskOptions);

}