Permalink
Browse files

Environment dependant FOSJsRoutingBundle generated routes

  • Loading branch information...
inmarelibero committed Nov 27, 2012
1 parent be1ec6b commit 3e037ae57082dee13d521d770c4c9e175c6ceab9
Showing with 9 additions and 2 deletions.
  1. +0 −1 app/config/assetic.yml
  2. +4 −1 app/config/routing.yml
  3. +5 −0 src/Bricks/SiteBundle/Resources/views/layout.html.twig
View
@@ -34,7 +34,6 @@ assetic:
- %kernel.root_dir%/../web/assets/bootstrap/js/bootstrap-alert.js
- %kernel.root_dir%/../web/assets/bootstrap/js/bootstrap-modal.js
- bundles/fosjsrouting/js/router.js
- - %kernel.root_dir%/../web/js/fos_js_routes.js
- @BricksSiteBundle/Resources/js/*.js
- @BricksSiteBundle/Resources/js/*/*.js
filters:
View
@@ -29,7 +29,10 @@ login:
logout:
pattern: /logout
defaults: { _controller: FOSUserBundle:Security:logout, _locale: %locale% }
-
+
+# FOSJsRoutingBundle routes
+fos_js_routing:
+ resource: "@FOSJsRoutingBundle/Resources/config/routing/routing.xml"
# FOSUserBundle routes
fos_user_security:
@@ -220,6 +220,11 @@
{% javascripts '@javascripts' %}
<script type="text/javascript" src="{{ asset_url }}"></script>
{% endjavascripts %}
+
+ {# FOSJsRoutingBundle generated routes by controller #}
+ <script type="text/javascript" src="{{ path('fos_js_routing_js', {"callback": "fos.Router.setData"}) }}"></script>
+
+
{% block javascripts_footer '' %}
</body>

0 comments on commit 3e037ae

Please sign in to comment.