0

I just have a quick question.

I'm using Symfony for the first time, and having problems including my CSS.

In my app\Resources\views\master.html.twig I have:

 <link rel='stylesheet' type='text/css' href='{{ asset('/css/huraga-green.css') }}'>

I can't make it work, it actually generates:

 <link rel="stylesheet" type="text/css" href="/css/xy.css">

which points to:

 http://localhost/css/xy.css

The problem is, I'm using easyPHP and I don't have anything on this route, root of my Symfony project is in :

C:\Program Files (x86)\EasyPHP-DevServer-13.1VC9\data\localweb\projects\symfony\

Like I said, I'm new to Symfony, so any help would be appreciated :)

TNx alot!

Adrian
  • 1,499
  • 3
  • 19
  • 26

1 Answers1

0

From the Symfony documentation: http://symfony.com/doc/current/cookbook/assetic/asset_management.html#including-css-stylesheets

Including CSS Stylesheets
To bring in CSS stylesheets, you can use the same technique explained above, except with the stylesheets tag:

{% stylesheets 'bundles/app/css/*' filter='cssrewrite' %}
    <link rel="stylesheet" href="{{ asset_url }}" />
{% endstylesheets %}
Tim Hovius
  • 721
  • 6
  • 16