a2nt/silverstripe-treemultiselect-sortable-field

Sortable tree multiselect field

Installs: 1 177

Dependents: 1

Suggesters: 0

Security: 0

Stars: 0

Watchers: 3

Forks: 3

Open Issues: 1

Language:JavaScript

Type:silverstripe-vendormodule

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

This package is auto-updated.

Last update: 2024-10-28 21:40:51 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