Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Tips and Tutorials
Why can't I switch active template in controller
class Controller_User_Auth extends \Controller_Base_Template
// This works
public $template = "default_template";
public function before()
// This does not work
$this->template = "cool_new_template";
Because $template should be a View instance.
It is the before() method of the Template controller that converts it if a string (= view name) is given instead of a View.
// this would work
$this->template = \View::forge("cool_new_template");
Add a Comment
It looks like you're new here. If you want to get involved, click one of these buttons!
Apply for Membership
↳ Job Board
↳ Installation & Setup
↳ Tips and Tutorials
↳ Code share
In this Discussion