diff --git a/README.md b/README.md index ce639fb..832fe48 100644 --- a/README.md +++ b/README.md @@ -225,6 +225,10 @@ $Announcements.ByType('modal'); ``` _Can be 'default', 'modal', 'tray', 'message', 'callout'_ +## Limitations + +* Does not have any CMS editable functionality + ## License Modified BSD License @@ -244,4 +248,6 @@ Read the [license](https://github.com/codecraft/silverstripe-announce/blob/maste * Create an email Announcement type * An announcement history for user-focused announcements * Flag announcement when viewed by user +* Add CMS editable announcements, similiar to [nzta/silverstripe-sitebanner](https://github.com/NZTA/silverstripe-sitebanner) + * Version CMS editable announcements diff --git a/src/Model/Announcement.php b/src/Model/Announcement.php index e0ad6ea..29e3311 100644 --- a/src/Model/Announcement.php +++ b/src/Model/Announcement.php @@ -120,11 +120,9 @@ public function __construct($name, $title = null, $content = null, $heading = nu } } - $this->extend('updateDefaultActions', $actions); + $actions = $this->getActions(); - foreach ($actions as $action) { - $this->getActions()->push($action); - } + $this->extend('updateDefaultActions', $actions); parent::__construct(); }