File tree 3 files changed +46
-3
lines changed
3 files changed +46
-3
lines changed Original file line number Diff line number Diff line change
1
+ # all these files should have unix line endings
2
+ * text eol =lf
Original file line number Diff line number Diff line change
1
+ .project
2
+ ~
3
+ .idea
Original file line number Diff line number Diff line change 1
- maximages
2
- =========
1
+ # maximages
2
+ Images for any data object
3
3
4
- Simple image gallery for any dataobject
4
+ ## Installation
5
+ ``` bash
6
+ composer require " webmaxsk/maximages:*"
7
+ ```
8
+
9
+ You can add images to any Page via CMS. You can disable images for any Page subclass by adding config to mysite/_ config.php:
10
+ ``` php
11
+ Blog::config()->allow_images = false;
12
+ Calendar::config()->allow_images = false;
13
+ CalendarEvent::config()->allow_images = false;
14
+ ErrorPage::config()->allow_images = false;
15
+ RedirectorPage::config()->allow_images = false;
16
+ UserDefinedForm::config()->allow_images = false;
17
+ VirtualPage::config()->allow_images = false;
18
+ ```
19
+
20
+ You can add images to any DataObject too, just extend DataObject with ObjectImagesExtension.
21
+
22
+ ## Usage
23
+ Add images to your template
24
+
25
+ ``` html
26
+ <% if SortedImages %>
27
+ <ul class =" small-block-grid-3" >
28
+ <% loop SortedImages %>
29
+ <li >
30
+ <a href =" $Link" title =" $Title" >
31
+ $CroppedImage(200,200)
32
+ </a >
33
+ </li >
34
+ <% end_loop %>
35
+ </ul >
36
+ <% end_if %>
37
+ ```
38
+
39
+ Add any lightbox you like, it is not included in this module!
40
+
41
+ ## Example usage
42
+ check https://github.com/Webmaxsk/silverstripe-intranet-plate
You can’t perform that action at this time.
0 commit comments