maximages
Images for any data object, (*1)
Installation
composer require "webmaxsk/maximages:*"
You can add images to any Page via CMS. You can disable images for any Page subclass by adding config to _config/config.yml:, (*2)
SilverStripe\ErrorPage\ErrorPage:
images:
enabled: false
SilverStripe\CMS\Model\VirtualPage:
images:
enabled: false
SilverStripe\CMS\Model\RedirectorPage:
images:
enabled: false
The maximum number of images can be also specified in the config using the following syntax (default is 20 for a page):, (*3)
SilverStripe\Blog\Model\BlogPost:
images:
count: 50
You can add images to any DataObject too, just extend DataObject with ObjectImagesExtension., (*4)
Usage
Add images to your template, (*5)
<% if SortedImages %>
<ul class="small-block-grid-3">
<% loop SortedImages %>
<li>
<a href="$Link" title="$Title">
$CroppedImage(200,200)
</a>
</li>
<% end_loop %>
</ul>
<% end_if %>
Add any lightbox you like, it is not included in this module!, (*6)
Example usage
check https://github.com/Webmaxsk/silverstripe-intranet-plate, (*7)