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!

2

1 Answer 1

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 %}
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.