symfony - Symfony2 - Use Bootstrap (glyphicon) and jQuery -


i beginner symfony , trying integrate specific bootstrap theme , jquery.

because of css files, js files , fonts shared bundles, put resources app\resources\public directory.

in directory, have following architecture :

  • css
    • bootstrap.min.css
    • jquery-ui.min.css
    • my-css.min.css
  • fonts
    • glyphicons-halflings-regular.eot
    • glyphicons-halflings-regular.svg
    • glyphicons-halflings-regular.ttf
    • glyphicons-halflings-regular.woff
  • js
    • bootstrap.min.js
    • jquery-1.9.1.min.js

i have layout.html.twig file in app\resources\views directory main layout. in layout, load css , js files following twig blocks :

<!-- css --> {% block stylesheets %}   {% stylesheets filter='cssrewrite'     '../app/resources/public/css/bootstrap.min.css'     '../app/resources/public/css/jquery-ui.min.css'     '../app/resources/public/css/my-css.min.css'   %}   <link href="{{ asset_url }}" rel="stylesheet" media="screen">   {% endstylesheets %} {% endblock %}  <!-- js --> {% block javascript %}   {% javascripts     '../app/resources/public/js/jquery-1.9.1.min.js'     '../app/resources/public/js/bootstrap.min.js'   %}     <script type="text/javascript" src="{{ asset_url }}"></script>   {% endjavascripts %} {% endblock %} 

the css files correctly loaded in pages, have error when use glyphicon. icons, on button example, not loaded , in console of firefox, have error 403 :

get  http://localhost/mylibrary-web/app/resources/public/fonts/glyphicons-halflings-regular.woff [http/1.1 403 forbidden 4ms] 

i try modify security.yml file without success :

firewalls:     dev:         pattern: ^/(_(profiler|wdt|error)|css|images|js|fonts)/         security: false 

how can authorize access fonts directory ? thx !

i assume haven't configured web server properly. if use apache server, can configure in way: https://github.com/fontello/fontello/wiki/how-to-setup-server-to-serve-fonts


Comments

Popular posts from this blog

shopping cart - Page redirect not working PHP -

php - How to modify a menu to show sub-menus -

python - Installing PyDev in eclipse is failed -