¿How to add code to the indexaction at the listcontroller?

50 views
Skip to first unread message

raul.del...@workscrossmedia.com

unread,
Feb 26, 2014, 11:15:49 AM2/26/14
to symfony2adm...@googlegroups.com
Hello,

My problem might be simple to resolve, I just don't know how.

I would like to filter the list of contacts to show in the listcontroller. For that I add the indexAction and with the filters.
The function itself ends with:
return $this->render(
                                'Bundle:AdmContactoList:index.html.twig',
                                array(
                                    "Contactos" => $contactos
                                )
                            );
So far so good. Now my problem is, when I try to go into the list I have this error

Key "nbResults" for array with keys "0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20" does not exist in Admingenerated/Bundle/Resources/views/AdmContactoList/results.html.twig at line 


Any idea what could be generating this error?

Best regards

Raúl

Cédric Lombardot

unread,
Mar 5, 2014, 5:19:52 AM3/5/14
to Symfony2 Admingenerator bundles support for users
Hello,

Have you take a look in your cache ? If you want to filter the list you have a specific method "buildQuery" wich help you to filter all your search on the same query

Cedric


--
--
You received this message because you are subscribed to the Google
Groups "Symfony2 Admingenerator bundles support for users" group.
To post to this group, send email to
symfony2adm...@googlegroups.com
To unsubscribe from this group, send email to
symfony2admingene...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony2admingenerator?hl=en
 
---
Found bundle documentation at http://symfony2admingenerator.org/
 
---
You received this message because you are subscribed to the Google Groups "Symfony2 Admingenerator bundles support for users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to symfony2admingene...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply all
Reply to author
Forward
0 new messages