thiagotalma/yii2-jstree

Widget for Yii Framework 2.0 to use JsTree

Maintainers

👁 thiagotalma

Package info

github.com/thiagotalma/yii2-jstree-widget

Type:yii2-extension

pkg:composer/thiagotalma/yii2-jstree

Statistics

Installs: 63 667

Dependents: 4

Suggesters: 0

Stars: 32

v1.0.0 2015-09-02 03:05 UTC

Requires

Requires (Dev)

None

Suggests

None

Provides

None

Conflicts

None

Replaces

None

BSD 3-Clause 68817a9c1c64218cfa606e9af7405a1c42f0bfd0

formextensionwidgetjstreeyii2

This package is not auto-updated.

Last update: 2026-06-17 20:19:21 UTC


README

Widget for Yii Framework 2.0 to use JsTree

👁 Latest Stable Version
👁 Total Downloads
👁 Monthly Downloads
👁 Daily Downloads
👁 Latest Unstable Version
👁 License

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist thiagotalma/yii2-jstree "~1.0.0"

or add

"thiagotalma/yii2-jstree": "~1.0.0"

to the require section of your composer.json file.

Usage

Once the extension is installed, simply use it in your code by :

<?= \talma\widgets\JsTree::widget([
 'attribute' => 'attribute_name',
 'model' => $model,
 'core' => [
 'data' => $data
 ...
 ],
 'plugins' => ['types', 'dnd', 'contextmenu', 'wholerow', 'state'],
 ...
]); ?>

Usage without a model (you must specify the "name" attribute) :

<?= \talma\widgets\JsTree::widget([
 'name' => 'js_tree',
 'core' => [
 'data' => $data
 ...
 ],
 'plugins' => ['types', 'dnd', 'contextmenu', 'wholerow', 'state'],
 ...
]); ?>

If you wanna use the contextmenu plugin and you are having issues with a not appearing menu, you should add the following css to your site:

.vakata-context {
 z-index:999 !important;
}