开发者

sorting items in admin module - Symfony

开发者 https://www.devze.com 2023-01-31 21:45 出处:网络
I have created an开发者_高级运维 admin module and I\'d like the items in the list view, to be able to \'sortable\'

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号