This topic contains 15 replies, has 4 voices, and was last updated by msulima 6 years, 1 month ago.
- Topic
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):
12345678910111213141516171819<?phpnamespace E7\StoreThemeBundle\Controller;use Symfony\Bundle\FrameworkBundle\Controller\Controller;use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;use Oro\Bundle\LayoutBundle\Annotation\Layout;class UserController extends Controller{/*** @Route("/test", name="demo_layout_test")* @Layout*/public function testAction(){return [];}}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:
123demo_layout_test:resource: "@StoreThemeBundle/Controller/"type: annotation… 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
http://www.e7solutions.com
The forum ‘OroCommerce’ is closed to new topics and replies.