sorting items in admin module - Symfony
I have created an开发者_高级运维 admin module and I'd like the items in the list view, to be able to 'sortable' I've been looking at the following tutorial http://www.symfony-project.org/cookbook/1_2/en/sortable which seems to shed some light.
The problem is, I'd like the 'move up', 'move down' features in a a partial.
So, I don't want to create a listSuccess.php page, but I then don't have access to the $items object in the executeList() action.
Any ideas how I'd achieve this?
Thanks
Well, you don't need $items
, you need only $item->getId()
Create a partial for a field, and inside that partial you will have access to current object being displayed.
You will also need to create _list_footer/_list_header
to put Javascript code in.
精彩评论