This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

vince_o
vince_o

Is it possible to use the reorder behavior described here inside a Relation Manager? My use case is a gallery plugin. I have two models: Gallery and Image. Galleries have many Images, and Images are managed using a Relation Manager on the create/update pages for Galleries. All of this works great. The only missing feature is the ability to re-order the Images in the Gallery. Ideally, I would like to do this all on the same page.

I could probably implement this myself if need be, but it would be great if I could leverage the reordering functionality that is baked into October. Thanks in advance!

Last updated

sercanvirlan
sercanvirlan

i need this too

merodeador
merodeador

I'm also trying to do this in a plugin i'm working on.

I have categories which contain items. I've managed to get a list of items to reorder, and the reordering works, but it just shows all items in all categories. how can i tell the the config_reorder.yaml file to select only the items of a specific category ?

axomat
axomat

Did anyone solve this please? I have the same challenge.

triasrahman
triasrahman

I need this too. :)

slouma.touati14302
vanchuck
vanchuck

Hi all, I didn't see this thread and posted one of my own. I came up with a solution, you can take a look here:

http://octobercms.com/forum/post/reordering-items-in-a-relation#post-13983

jacky30257
jacky30257

it can work, 可以在明细表支持排序,请再看看官方资料。

class xxx extends Controller
{
    public $implement = [
        'Backend.Behaviors.FormController',
        'Backend.Behaviors.RelationController',
        'Backend.Behaviors.ListController',
        'Backend.Behaviors.ReorderController'  //  add /reorder url
    ];
 public $reorderConfig = 'config_reorder.yaml'; // config reorder

----------------in the confirm_reorder.yaml
# Model Class name
modelClass: xxx  #  指定 Relation model 

for your reference:

https://octobercms.com/docs/backend/reorder

1-8 of 8

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.