- Adds a simple uploadfield to a page for a featuredimage
or set of featured images (max amount configurable)
- SilverStripe 4.1 or newer
composer require restruct/silverstripe-featuredimages dev-master
Add to config.yml (max_featured_images is optional, default = 1):
Page:
extensions:
- '\Restruct\SilverStripe\FeaturedImages\FeaturedImageExtension'
max_featured_images: 3
And use in templates as
$PageImage
or
<% loop $PageImages %>
$Me
<% end_loop %>