Closed lowap closed 6 years ago
I've found also just right now! getBreadCrumbs() http://demos.krajee.com/tree-manager#model-methods thx a lot!
the one that you say, I don't know why but it's not working for me. Something is missing or I don't know. I need to call the function in the view for a dropdown, so I guess it's planned not for this, is it?
Oh, it's not really working somehow. Parents are not correct. I have this in model:
public function getDispName() { return $this->getBreadcrumbs(null, ' > ', null); }
and then in the form:
$form->field($model, 'group_id')->dropDownList( \yii\helpers\ArrayHelper::map(app\models\Pmgroup::find()->orderBy(['root' => SORT_ASC, 'lft' => SORT_ASC])->all(), 'id', 'dispName'), [ ]
Am I doing something wrong?
Ich habe's gefunden!
->addOrderBy('root, lft')
- so ist richtig!
Hi,
Thank you for this extension. I have a node e.g. apple, I need to show it like: tree > fruit > apple is this possible somehow? Thx a lot!