0

I have Symfony 2.6.3 and Sonata Admin Bundle 2.3.1. I tried to change the template in my list:

$listMapper
    ->addIdentifier('id')
   ->add('custom', 'string', array('template' =>'NewBundle::list_custom.html.twig'));
}

but this does nothing. The template hasn't changed but there are also no errors. How to fix it?

In previous Symfony verion this worked.

SuperDJ
  • 7,488
  • 11
  • 40
  • 74

1 Answers1

0

I use the same version and it work for me. Reason is wrong path to your twig template. Unfortunatly Sonata doesn't return error if template doesn't exits.

I recommend you to test path of your twig. To do this you can e.g include this file to another twig. If path of twig is not correctly symfony will throw error.

Piotr Galas
  • 4,518
  • 2
  • 21
  • 30
  • When SonataAdminBundle silently fail to load a template, the default one is used. As suggested you should check the template path. – rande Feb 02 '15 at 15:41