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

jasonwong
jasonwong

Where has a showTree example? I set showTree to true, but no change in the list page.

jasonwong
jasonwong

ok,I found a way that is used \October\Rain\Database\Traits\NestedTree in the plugin model class.

RomaldyMinaya
RomaldyMinaya

Would you mind uploading an code example of how did you achieved that ?

iulianBilcu
iulianBilcu

Model:

<?php namespace Plugin\Models;

use Model;
use October\Rain\Database\Traits\NestedTree;

class Group extends Model
{
use NestedTree;
// other code
}

config_list.yaml

showTree: 1 //Display tree view
treeExpanded: 1 // Tree expanded by default

Migration additional fields

$table->integer('nest_left');
$table->integer('nest_right');
$table->integer('nest_depth');

arasnacis13731
arasnacis13731

Do you get any answers?

1-5 of 5

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