[Flow] Use another Template in Controller Action

Sascha Reule mail at sascha-reule.de
Sun Jun 21 17:29:34 CEST 2015


Hey Patric,

you could do it the quick and dirty way:

public function indexAction() {
   return $this->view->render("../Test2/Index");
}

I know I’ve seen a better way to change the templatePath and templateFile for a controller action, but it works.

PS: If you had some view code which should be used in more then one controller action use partials for that.



--
Sascha Reule
Sent with Airmail


Am 21. Juni 2015 bei 13:40:08, Patric Eckhart (mail at patriceckhart.com<mailto:mail at patriceckhart.com>) schrieb:

Hey guys,

I will use the Template Test/List.html in this Controller Action, but the Controller Action Test2Controller always take the Test2/Index.html.
Can I define a Template like $templatePath = .... ?

/**
* @return void
*/
public function indexAction() {
$this->view->assign('username', $this->loginRepository->getUsername());
}
_______________________________________________
Flow mailing list
Flow at lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/flow


More information about the Flow mailing list