diff --git a/README.md b/README.md index c05d2f8..5baa54a 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ Plugin. ## Requirements -SilverStripe Framework v4+ +SilverStripe Framework v4+ and v5+ For a Version that is compatible to SilverStripe 3+, consider using the [3.0 release](https://github.com/tractorcow/silverstripe-colorpicker/releases/tag/3.0.0) @@ -27,7 +27,7 @@ private static $db = [ ]; ``` -Alternatively, you can also use the fully qualified classname. +Alternatively, you can also use the fully qualified classname. The best way to do this is to import the class at the top of your PHP file, like so: use TractorCow\Colorpicker\Color; @@ -51,7 +51,7 @@ public function getCMSFields() $fields = parent::getCMSFields(); $fields->addFieldToTab( - 'Root.Main', + 'Root.Main', ColorField::create('BgColor', 'Background color') ); @@ -61,7 +61,7 @@ public function getCMSFields() ### Tips for using the Color fieldtype in templates -The `TractorCow\Colorpicker\Color` fieldtype provides some helper methods that can be useful in templating. +The `TractorCow\Colorpicker\Color` fieldtype provides some helper methods that can be useful in templating. Let's consider the above scenario where you have a Field named 'BgColor'. The most common use-case is something like this: ```html diff --git a/composer.json b/composer.json index 2ae5001..ed01291 100644 --- a/composer.json +++ b/composer.json @@ -18,7 +18,7 @@ "issues": "https://github.com/tractorcow/silverstripe-colorpicker/issues" }, "require": { - "silverstripe/framework": "^4.0" + "silverstripe/framework": "^4.0 || ^5.0" }, "extra": { "branch-alias": {