title: How to embed an action from a sub-namespaced controller in Symfony 2?
body: <p>I'm trying to render an action which is in a sub-namespaced controller from within a Twig view in Symfony 2.</p>
  
  <p>The <strong>problem</strong> is: The render helper cannot find the controller/action because it's in a namespace below <em>Controller</em>.</p>
  
  <p>This is my controller:
  <strong>src/Acme/Bundle/TestBundle/Controller/FirstModule/ExampleController.php</strong></p>
  
  <pre><code>namespace Acme\Bundle\TestBundle\Controller\FirstModule;
  
  class ExampleController extends Controller
  {
      public function exampleAction(Request $request)
      {
          return $this-&gt;render('AcmeTestBundle:FirstModuleExample:example.html.twig');
      }
  
      public function embedAction(Request $request)
      {
          return $this-&gt;render('AcmeTestBundle:FirstModuleExample:embed.html.twig');
      }
  }
  </code></pre>
  
  <p>This is my view:
  <strong>src/Acme/Bundle/TestBundle/Resources/views/FirstModuleExample/example.html.twig</strong></p>
  
  <pre><code>{% render "AcmeTestBundle:Example:embed" %}
  // or
  {% render "Acme\Bundle\TestBundle\Controller\FirstModule\Example:example" %}
  // or
  {% render "Acme\Bundle\TestBundle\Controller\FirstModule\ExampleController:exampleAction" %}
  </code></pre>
  
  <p>I have read the <a href="http://symfony.com/doc/current/book/templating.html#embedding-controllers" rel="nofollow">Embedding Controllers</a> documentation but no clue there how to handle Controllers that are in a sub-namespace.</p>
  
  <p>Thanks.</p>