Hello! I’ve been following the Quick Start guide for Layout Themes, and have run into a couple problems after making the controller. Below is my controller (example copied from the guide):
class UserController extends Controller
* @Route("/test", name="demo_layout_test")
public function testAction()
First, I was blocked by the fact that routing would not work in the Controller (annotation type). The ‘/test’ route was not recognized by Symfony. After research I tried including this in app/config/routing.yml:
… and that worked! So, I think it should be noted in the docs that this change is required for routing to work.
However, I then went to /test and the page only contained a header and footer, with empty content. I tried to place some HTML in various places in the default.html.twig file, but none of it showed up. Does anyone know what I might be missing? I followed the Quick Start exactly as far as I know.
UI Developer at E7 Solutions
You must be logged in to reply to this topic.