Skip to content

Commit d8c2977

Browse files
Merge pull request #14 from DorsetDigital/master
SS4 vendor module, typo fix and readme update
2 parents 7f172ad + 1411725 commit d8c2977

File tree

3 files changed

+16
-2
lines changed

3 files changed

+16
-2
lines changed

README.md

+9
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,15 @@ SilverStripe\CMS\Model\RedirectorPage:
1919
enabled: false
2020
```
2121

22+
The maximum number of images can be also specified in the config using the following syntax (default is 20 for a page):
23+
24+
```php
25+
SilverStripe\Blog\Model\BlogPost:
26+
images:
27+
count: 50
28+
```
29+
30+
2231
You can add images to any DataObject too, just extend DataObject with ObjectImagesExtension.
2332

2433
## Usage

composer.json

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "webmaxsk/maximages",
33
"description": "Simple image gallery for any dataobject",
4-
"type": "silverstripe-module",
4+
"type": "silverstripe-vendormodule",
55
"license": "BSD-3-Clause",
66
"keywords": ["silverstripe", "gallery", "photos", "images"],
77
"authors": [
@@ -21,5 +21,10 @@
2121
"suggest": {
2222
"heyday/silverstripe-optimisedimage": "*",
2323
"jonom/focuspoint": "*"
24+
},
25+
"autoload": {
26+
"psr-4": {
27+
"Webmaxsk\\MaxImages\\": "src/"
28+
}
2429
}
2530
}

src/ObjectImagesExtension.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public function updateCMSFields(FieldList $fields) {
5555
$imageField->setDescription(sprintf(_t('Object.IMAGESUPLOADLIMIT','Images count limit: %s'), $limit));
5656

5757
if ($this->owner->Sorter == 'SortOrder')
58-
$message = _t('Object.IMAGESUPLOADHEADING', '<span style="color: green">Sort images by draging thumbnail</span>');
58+
$message = _t('Object.IMAGESUPLOADHEADING', '<span style="color: green">Sort images by dragging thumbnail</span>');
5959
else
6060
$message = _t('Object.IMAGESSORTERNOTICE', 'Correct image sorting is visible on frontend only (if Sort by = Title, ID)');
6161

0 commit comments

Comments
 (0)