Skip to Content
Menú
This question has been flagged
1 Respondre
3101 Vistes

I am not able reordering partner categories. Categories always appear in the order I have created them. In the source code, I see they are ordered by "parent_left, name", but I cannot understand what is this "parent_left" attribute and how to modify it.


Avatar
Descartar
Best Answer
parent_left and parent_right, sets up a Nested set model to enable fast hierarchical queries on the records of the current model. These attributes are generated automatically, that are related to the parent_id field, see ORM API documentation

Here Example

Avatar
Descartar
Autor

Ok, thank you for this good explaination. However this does not tell me nothing about how to reorder categories...

You temporary change parent_id in all childrens, in next step restore parent_id (select positions to restore in right order).

Related Posts Respostes Vistes Activitat
1
de març 15
5281
0
de gen. 25
1393
1
de nov. 24
1215
2
de set. 24
2307
1
de maig 23
5406