marciocamello/yii2-mcms-nested

Nested Sortable based in nestedSortable jQuery Plugin

Installs: 455

Dependents: 0

Suggesters: 0

Security: 0

Stars: 4

Watchers: 5

Forks: 3

Open Issues: 1

Language:JavaScript

Type:yii2-extension

dev-master 2014-05-03 00:43 UTC

This package is not auto-updated.

Last update: 2024-05-07 05:15:53 UTC


README

Nested Sortable based in nestedSortable jQuery Plugin

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist marciocamello/yii2-mcms-nested "*"

or add

"marciocamello/yii2-mcms-nested": "*"

to the require section of your composer.json file.

List Sortable

echo \mcms\nested\NestedSortable::widget([
	'model' => Menu::className(),
	'url' => 'nested/save-sortable',
	'expand' => true,
	'pluginOptions' => [
		'maxDepth' => 2
	]
]);

Action

public function actions()
	{
		return [
			'save-sortable' => [
				'class' => 'mcms\nested\NestedSortableAction',
				//'scenario'=>'editable',  //optional
				'modelclass' => Categories::className(),
			],
		];
	}