themes - Symfony2 theming -


i want basic theming support in symfony2 project, wanted have separated static files (css, js, img) each theme.

i have tried add

assetic:     read_from:  %kernel.root_dir%/../web/themes/mytheme 

but took no effect, {{ asset('css/style.css') }} still referencing realtic %kernel.root_dir%/../web, instead %kernel.root_dir%/../web/themes/mytheme.

any idea?

fixed config:

assetic:     debug:          %kernel.debug%     use_controller: false     read_from: %kernel.root_dir%/../web/bundles/mybundle/themes/%my_theme%     write_to: %kernel.root_dir%/../web     filters:         yui_css:             jar: "%kernel.root_dir%/resources/java/yuicompressor.jar"         yui_js:             jar: "%kernel.root_dir%/resources/java/yuicompressor.jar" 

and in layout have:

    {% stylesheets 'css/*' filter='?yui_css' %}     <link rel="stylesheet" type="text/css" media="all" href="{{ asset_url }}" />     {% endstylesheets %} 

Comments