I have imported the client side of my web app to
/bundle/Resources/views
This includes html documents, as well as the css, js, images and fonts folders. When i open an html page in a browser, it renders fine. But just by changing the extension of the file to .html.twig and rendering it through the symfony2 framework disables css.
I have also copied the css, js, images and font folders to
/bundle/Resources/public
I have also tried using the twig assets('') function with no luck.
What's going on?
First execute app/console assets:install ( consider adding --symlink ). The command will copy/symlink all your bundle's Resources/public to web/bundles and create a folder in there named as the lowercase bundle-name without a trailing "Bundle".
example:
YourAwesomeBundle\Resources\public\css\style.css will be copied/symlinked to web\bundles\yourawesome\css\style.css
... afterwards include the assets using asset("@YourBundle/Resources/public/css/style.css")
... or asset("bundles/your/css/style.css")
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With