a2nt/silverstripe-treemultiselect-sortable-field

Sortable tree multiselect field

Installs: 586

Dependents: 1

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 0

Open Issues: 1

Language:JavaScript

Type:silverstripe-vendormodule

dev-main 2020-11-28 12:43 UTC

This package is auto-updated.

Last update: 2022-09-28 17:08:43 UTC


README

SilverStripe Tree Multi-select sortable field

SilverStipe custom sort field on tree items

Installation

composer require a2nt/silverstripe-treemultiselect-sortable-field

Usage

  • Install the module, run dev/build
  • Add your custom field
 private static $many_many = [
    'FooterNavigation' => SiteTree::class,
];

private static $many_many_extraFields = [
    'FooterNavigation' => [
        'SortOrder' => 'Int',
    ],
];

TreeMultiselectFieldSortable::create(
    'SortOrder', // order field name
    'FooterNavigation', // relation name
    'Footer Navigation', // field title
    SiteTree::class // relation objects class name
)

alt text