From 64d031b522c843e893fd41c3cb092f2630e66ddd Mon Sep 17 00:00:00 2001 From: mak001 Date: Tue, 11 Sep 2018 10:29:00 -0500 Subject: [PATCH] Added alternative option for promo elements --- src/Elements/ElementPromos.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Elements/ElementPromos.php b/src/Elements/ElementPromos.php index c7d6be7..ca023c1 100644 --- a/src/Elements/ElementPromos.php +++ b/src/Elements/ElementPromos.php @@ -13,6 +13,7 @@ /** * Class PromosElement. + * @property boolean $Alternate */ class ElementPromos extends BaseElement { @@ -46,6 +47,7 @@ class ElementPromos extends BaseElement */ private static $db = [ 'Content' => DBHTMLText::class, + 'Alternate' => 'Boolean', ]; /** @@ -71,8 +73,8 @@ public function getCMSFields() { $this->beforeUpdateCMSFields(function (FieldList $fields) { $fields->dataFieldByName('Content') - ->setRows(8) - ; + ->setRows(8); + $fields->dataFieldByName('Alternate')->setTitle('Alternate images and text'); if ($this->ID) { $promoField = $fields->dataFieldByName('Promos');