View more context


  1. public function index() {
  2. if (...) {
  3. return $this->renderWith('template1');
  4. }
  5. else {
  6. return $this->renderWith('template2');
  7. }
  8. }

you mean do the thing in the grey box above?


One more thing if i may....

Does the same apply for controllers?

currently all other templates are in app/src


speaking in terms of the Blog Module question from above


Just read over the docs and that didn't seem to help very much.

I am setting up a FunctionalTest test. Before I call $this->get('/some url') I am pulling in the session via Injector::inst()->create(Session::class, []); and setting an initial value.

When my test runs my controller doesn't seem to see this session value that was setup. Is there some magic in terms of setting session values in a test?