Skip to content

how can i move two main nodes that have no targets ? #5

Description

@khashabawy

In the attached file how can i move Plastics and Electronics :

untitled

for moving any other sub nodes i do this :

        $cat = $this->nested_set->getNodeFromId($cat_id);

        if($cat["cat_parent_id"]){

            $parent = $this->nested_set->getNodeFromId($cat["cat_parent_id"]);

            if($direction == "up"){                            
                $this->nested_set->setNodeAsFirstChild($cat , $parent);
            }else{                
                $this->nested_set->setNodeAsLastChild($cat , $parent);
            }       
        }

I there any way to :

1- move nodes by one step ( not as first child or last child ) ?
2- move main nodes that have no targets (parents) ?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions