There is a route in routing.uml
category: path: /category defaults: { _controller: MainBundle:Client:showCategory }
presenter on the action, which renders the page to which the styles are connected in this way: <link rel="stylesheet" href="bundles/MainBundle/css/category.css">
. At the same time, everything works, when switching to /category
styles are successfully loaded. There was a task to transfer to the route with the id category parameter. I do this by example. In routing.uml
:
category: path: /category/{id} defaults: { _controller: MainBundle:Client:showCategory } requirements: id: '\d+
And now, after switching to /category/1
page content is displayed, but without styles. What you need to fix to return the css?
Symfony version 3.1
href="<?php echo $view['assets']->getUrl('bundles/MainBundle/css/category.css') ?>"
- QA_Zero