-5

I have my base.html.twig under /var/www/symfony2.5/app/Resources/views, which includes a css file which is located under /var/www/myproj/Site/Front/css/mycss.css file. My sources files (controllers) are under /var/www/files/myproj.

I included all these paths in autoload.php. But I m not sure how to include mycss.css file in base.html.twig. I always see path not found error.

Any help would be greatly appreciated.

Thanks, Bharani

Bharani
  • 1
  • 1
  • 3
  • 2
    I have no idea how you managed to mangle a Symfony project so far in the wrong direction - your paths make no sense, and there would be no reason to include a CSS path in an `autoload.php` file - on that basis, I really can't understand what you're doing or figure out what you're saying. – sjagr Nov 10 '14 at 15:58
  • Post your code when asking something. – Apul Gupta Nov 10 '14 at 16:04
  • The path is a client requirement I cannot do anything about. The link to css file in base.html.twig is – Bharani Nov 10 '14 at 16:35

1 Answers1

0

Create a bundle and put all your templates in it, then put all your assets (css, js, images) into bundle you created.

Then install assets using command line and it will work.

Now you are using WRONG directories for your project. I don't understand why you use Symfony2 framework if you don't use it at full ability. If you use Symfony2 correctly using assets and building pages will be simplier than you do it now.

Ignas Damunskis
  • 1,515
  • 1
  • 17
  • 44
  • The paths are requirements from the client and not me. The css file path and twig files are in two different paths. I am just wondering how i can give the path to css file in base.html.twig. – Bharani Nov 10 '14 at 18:26