hkguile
hkguile

Reputation: 4359

symfony2 2.7 define asset path

How do i define asset path for twig?

<html>
    <head>
        <meta charset="UTF-8" />
        <title></title>

        <link rel="icon" type="image/x-icon" href="{{ asset('favicon.ico') }}" />
    </head>
    <body>
    <img src="{{ asset('iphone5sSmall.png') }}" width="300" height="659"  alt=""/>
    </body>
</html>

i just download a symfony2 and see base.html.twig, how can i define the deflaut path for asset function?

i had tried define that in config.yml but not successful

Upvotes: 1

Views: 94

Answers (1)

Ali
Ali

Reputation: 493

it would be much easier if you add your config.yml however you can use console for adding a path to assets :

app/console assets:install path

Upvotes: 1

Related Questions