Yoan Arnaudov
Yoan Arnaudov

Reputation: 4134

symfony2 namespaces using render(controller(..))

When I try to call:

{{ render(controller(
    'AppBundle:Default:_test'
)) }}

this one works, but if I create Admin folder and move my DefaultController there and call it like that:

{{ render(controller(
    'AppBundle:Admin:Default:_test'
)) }}

this error shows up

("Unable to parse the controller name "AppBundle:Admin:Default:_test".")

What I'm missing? Thanks.

Upvotes: 0

Views: 63

Answers (1)

VaN
VaN

Reputation: 2210

If you moved the controller from Default to Admin/Default folder, you should call it with

{{ render(controller(
    'AppBundle:Admin/Default:_test'
)) }}

Upvotes: 1

Related Questions