https://github.com/a2nt/silverstripe-treemultiselect-sortable-field
SilverStipe custom sort field on tree items
https://github.com/a2nt/silverstripe-treemultiselect-sortable-field
Last synced: 10 months ago
JSON representation
SilverStipe custom sort field on tree items
- Host: GitHub
- URL: https://github.com/a2nt/silverstripe-treemultiselect-sortable-field
- Owner: a2nt
- License: bsd-3-clause
- Created: 2020-11-28T11:40:13.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2020-11-28T12:43:30.000Z (over 5 years ago)
- Last Synced: 2024-12-08T08:34:55.269Z (over 1 year ago)
- Language: JavaScript
- Size: 306 KB
- Stars: 0
- Watchers: 3
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# silverstripe-treemultiselect-sortable-field
# 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
)
```
