Passing conditions to moveUp and moveDown


#1

Hello,

I’ve build an application where pages have modules. So I have pages, containing many modules, who need to be organise relatively to the page where they are.

My modules have the Tree Behavior and are ordered by lft ASC, which is good. But when I want to move up or move down a module it reorganise all the table and doesn’t take care of the page where are placed the modules.

I’d like to use a condition like :
$this->Model->moveDown($entity)->where('Modules.ref'=>'Pages',Modules.ref_id'=>$entity->ref_id);

How to do it correctly ?

Thank you