symfony2 - Symony2 asset - app/Resources -
symfony2 - Symony2 asset - app/Resources -
maybe don't understand it. main template is: app/resources/view... should css/js/img ? in sentiment in: app/resources/view/public/... because isn't files bundles , project in production environment. in case "frontend page".
of course, when files(css/js/img) belongs bundle in appropriate bundle.
now have:
{% stylesheets '../app/resources/views/public/css/*' %} <link href="{{ asset_url }}" type="text/css" rel="stylesheet" /> {% endstylesheets %}
assetic add together file located in app/resources/js
but don't see images files.
how according standard symony2, should store , manage "main" template files?
i safely , well. larn symfony2.
all "web assets resources" should place web folder (that made files "reachable" www).
you need run php app/consolle assets:install
(*) allow symfony place of assets in right place
when want utilize them use
<link href="{{ asset('bundles/yourbundlename/css/style.css') }}" type="text/css" rel="stylesheet">
(or whatever have called files)
(*) can take --symlink
alternative avoid file copies
symfony2
Comments
Post a Comment