diff --git a/src/Widgets/LinksWidget.php b/src/Widgets/LinksWidget.php index a442911..b481a84 100755 --- a/src/Widgets/LinksWidget.php +++ b/src/Widgets/LinksWidget.php @@ -1,6 +1,5 @@ Link::class, ]; + private static $many_many_extraFields = [ + 'Links' => [ + 'Sort' => 'Int', + ], + ]; + private static $owns = [ 'Links', ]; public function getCMSFields() { + //die('aaa'); $fields = parent::getCMSFields(); if($this->ID) { @@ -47,11 +53,13 @@ class LinksWidget extends Widget 'Links', $this )); - }else{ - $fields->push(LiteralField::create( - 'Note', - '

Note: The widget needs to be saved before adding a link.' - .' Enter the Title and click "+ Create" button at the bottom left corner of the screen

') + } else { + $fields->push( + LiteralField::create( + 'Note', + '

Note: The widget needs to be saved before adding a link.' + .' Enter the Title and click "+ Create" button at the bottom left corner of the screen

' + ) ); }