Skip to content

Commit

Permalink
added a missing reference to the proxy route (refs symfony/symfony-st…
Browse files Browse the repository at this point in the history
…andard#475)
  • Loading branch information
fabpot committed Jan 20, 2013
1 parent ddc8747 commit 6fd5ffc
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions book/templating.rst
Original file line number Diff line number Diff line change
Expand Up @@ -688,6 +688,42 @@ Symfony2 uses the standard ``render`` helper to configure ``hinclude`` tags:

hinclude.js_ needs to be included in your page to work.

.. note::

When using a controller instead of an URL, you must enable the Symfony
``proxy`` routing configuration:

.. configuration-block::

.. code-block:: yaml
# app/config/routing.yml
_proxy:
resource: "@FrameworkBundle/Resources/config/routing/proxy.xml"
prefix: /proxy
.. code-block:: xml
<!-- app/config/routing.xml -->
<?xml version="1.0" encoding="UTF-8" ?>
<routes xmlns="http://symfony.com/schema/routing"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://symfony.com/schema/routing http://symfony.com/schema/routing/routing-1.0.xsd">
<import resource="@FrameworkBundle/Resources/config/routing/proxy.xml" prefix="/proxy" />
</routes>
.. code-block:: php
// app/config/routing.php
use Symfony\Component\Routing\RouteCollection;
use Symfony\Component\Routing\Route;
$collection->addCollection($loader->import('@FrameworkBundle/Resources/config/routing/proxy.xml', '/proxy'));
return $collection;
Default content (while loading or if javascript is disabled) can be set globally
in your application configuration:

Expand Down

0 comments on commit 6fd5ffc

Please sign in to comment.